diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2005-05-21 01:27:04 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2005-05-21 01:27:04 +0000 |
commit | 89026028d1c730c360f4b20d7449ca73dea065d4 (patch) | |
tree | 611375e804f6624195efafab3cd51444fdfb935b | |
parent | 0660f754df416e5fee4d80711b16cf9dc5318d35 (diff) |
Make the registration hash_map static. No other module needs it. Also,
document what its for a little better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22164 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/IPO/SimplifyLibCalls.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/SimplifyLibCalls.cpp b/lib/Transforms/IPO/SimplifyLibCalls.cpp index 64e7477adc..382bbb879e 100644 --- a/lib/Transforms/IPO/SimplifyLibCalls.cpp +++ b/lib/Transforms/IPO/SimplifyLibCalls.cpp @@ -42,8 +42,12 @@ Statistic<> SimplifiedLibCalls("simplify-libcalls", class LibCallOptimization; class SimplifyLibCalls; +/// This hash map is populated by the constructor for LibCallOptimization class. +/// Therefore all subclasses are registered here at static initialization time +/// and this list is what the SimplifyLibCalls pass uses to apply the individual +/// optimizations to the call sites. /// @brief The list of optimizations deriving from LibCallOptimization -hash_map<std::string,LibCallOptimization*> optlist; +static hash_map<std::string,LibCallOptimization*> optlist; /// This class is the abstract base class for the set of optimizations that /// corresponds to one library call. The SimplifyLibCalls pass will call the |