summaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/CloneModule.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-03 00:08:31 +0000
committerChris Lattner <sabre@nondot.org>2007-02-03 00:08:31 +0000
commit5e665f559419c7f58a4fd9360cd488f065505c44 (patch)
treeb0b885dc43015823c992923bd3a03b0cb4defa7b /lib/Transforms/Utils/CloneModule.cpp
parent4642ca6589d3002861963744a157169f15d1ee90 (diff)
downloadllvm-5e665f559419c7f58a4fd9360cd488f065505c44.tar.gz
llvm-5e665f559419c7f58a4fd9360cd488f065505c44.tar.bz2
llvm-5e665f559419c7f58a4fd9360cd488f065505c44.tar.xz
Switch inliner over to use DenseMap instead of std::map for ValueMap. This
speeds up the inliner 16%. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33801 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/CloneModule.cpp')
-rw-r--r--lib/Transforms/Utils/CloneModule.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Utils/CloneModule.cpp b/lib/Transforms/Utils/CloneModule.cpp
index a4460fa69b..d481aea0e5 100644
--- a/lib/Transforms/Utils/CloneModule.cpp
+++ b/lib/Transforms/Utils/CloneModule.cpp
@@ -29,12 +29,12 @@ using namespace llvm;
Module *llvm::CloneModule(const Module *M) {
// Create the value map that maps things from the old module over to the new
// module.
- std::map<const Value*, Value*> ValueMap;
-
+ DenseMap<const Value*, Value*> ValueMap;
return CloneModule(M, ValueMap);
}
-Module *llvm::CloneModule(const Module *M, std::map<const Value*, Value*> &ValueMap) {
+Module *llvm::CloneModule(const Module *M,
+ DenseMap<const Value*, Value*> &ValueMap) {
// First off, we need to create the new module...
Module *New = new Module(M->getModuleIdentifier());
New->setDataLayout(M->getDataLayout());