[llvm-commits] CVS: llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp

Reid Spencer reid at x10sys.com
Fri May 20 18:27:15 PDT 2005



Changes in directory llvm/lib/Transforms/IPO:

SimplifyLibCalls.cpp updated: 1.41 -> 1.42
---
Log message:

Make the registration hash_map static. No other module needs it. Also, 
document what its for a little better.


---
Diffs of the changes:  (+5 -1)

 SimplifyLibCalls.cpp |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)


Index: llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp
diff -u llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.41 llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.42
--- llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp:1.41	Fri May 20 19:57:44 2005
+++ llvm/lib/Transforms/IPO/SimplifyLibCalls.cpp	Fri May 20 20:27:04 2005
@@ -42,8 +42,12 @@
 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






More information about the llvm-commits mailing list