summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-05-21 01:27:04 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-05-21 01:27:04 +0000
commit9fbad13dd7d5e4270f14913d4e9b78308737ba2e (patch)
tree63c3b8f6ed1bc5b9714864a1d299ece03926f6ea /llvm/lib/Transforms/IPO
parent0b13cdabae1ec5d9aea6c7b06c7576ebb493cf51 (diff)
downloadbcm5719-llvm-9fbad13dd7d5e4270f14913d4e9b78308737ba2e.tar.gz
bcm5719-llvm-9fbad13dd7d5e4270f14913d4e9b78308737ba2e.zip
Make the registration hash_map static. No other module needs it. Also,
document what its for a little better. llvm-svn: 22164
Diffstat (limited to 'llvm/lib/Transforms/IPO')
-rw-r--r--llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp b/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
index 64e7477adcb..382bbb879e7 100644
--- a/llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud