Changes in directory llvm/include/llvm/Transforms/Utils:
Cloning.h updated: 1.21 -> 1.22 --- Log message: Switch inliner over to use DenseMap instead of std::map for ValueMap. This speeds up the inliner 16%. --- Diffs of the changes: (+8 -8) Cloning.h | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) Index: llvm/include/llvm/Transforms/Utils/Cloning.h diff -u llvm/include/llvm/Transforms/Utils/Cloning.h:1.21 llvm/include/llvm/Transforms/Utils/Cloning.h:1.22 --- llvm/include/llvm/Transforms/Utils/Cloning.h:1.21 Tue Jan 30 17:22:39 2007 +++ llvm/include/llvm/Transforms/Utils/Cloning.h Fri Feb 2 18:07:40 2007 @@ -19,7 +19,7 @@ #define LLVM_TRANSFORMS_UTILS_CLONING_H #include <vector> -#include <map> +#include "llvm/ADT/DenseMap.h" namespace llvm { @@ -38,7 +38,7 @@ /// CloneModule - Return an exact copy of the specified module /// Module *CloneModule(const Module *M); -Module *CloneModule(const Module *M, std::map<const Value*, Value*> &ValueMap); +Module *CloneModule(const Module *M, DenseMap<const Value*, Value*> &ValueMap); /// ClonedCodeInfo - This struct can be used to capture information about code /// being cloned, while it is being cloned. @@ -94,7 +94,7 @@ /// parameter. /// BasicBlock *CloneBasicBlock(const BasicBlock *BB, - std::map<const Value*, Value*> &ValueMap, + DenseMap<const Value*, Value*> &ValueMap, const char *NameSuffix = "", Function *F = 0, ClonedCodeInfo *CodeInfo = 0); @@ -109,13 +109,13 @@ /// information about the cloned code if non-null. /// Function *CloneFunction(const Function *F, - std::map<const Value*, Value*> &ValueMap, + DenseMap<const Value*, Value*> &ValueMap, ClonedCodeInfo *CodeInfo = 0); /// CloneFunction - Version of the function that doesn't need the ValueMap. /// inline Function *CloneFunction(const Function *F, ClonedCodeInfo *CodeInfo = 0){ - std::map<const Value*, Value*> ValueMap; + DenseMap<const Value*, Value*> ValueMap; return CloneFunction(F, ValueMap, CodeInfo); } @@ -126,7 +126,7 @@ /// specified suffix to all values cloned. /// void CloneFunctionInto(Function *NewFunc, const Function *OldFunc, - std::map<const Value*, Value*> &ValueMap, + DenseMap<const Value*, Value*> &ValueMap, std::vector<ReturnInst*> &Returns, const char *NameSuffix = "", ClonedCodeInfo *CodeInfo = 0); @@ -139,7 +139,7 @@ /// dead. Since this doesn't produce an exactly copy of the input, it can't be /// used for things like CloneFunction or CloneModule. void CloneAndPruneFunctionInto(Function *NewFunc, const Function *OldFunc, - std::map<const Value*, Value*> &ValueMap, + DenseMap<const Value*, Value*> &ValueMap, std::vector<ReturnInst*> &Returns, const char *NameSuffix = "", ClonedCodeInfo *CodeInfo = 0, @@ -150,7 +150,7 @@ /// saved in ValueMap. /// void CloneTraceInto(Function *NewFunc, Trace &T, - std::map<const Value*, Value*> &ValueMap, + DenseMap<const Value*, Value*> &ValueMap, const char *NameSuffix); /// CloneTrace - Returns a copy of the specified trace. _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits