summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit1bfc7ab6a770babdcb3c83e4a8762a1b380a3bd4 (patch)
tree2ae599c50e4c47ce2b5d1f1d68069bad9cff546c /llvm/lib/Transforms/Utils/CloneModule.cpp
parentb739f7d3376ea343b80c936e50e9dd54f1ce264a (diff)
downloadbcm5719-llvm-1bfc7ab6a770babdcb3c83e4a8762a1b380a3bd4.tar.gz
bcm5719-llvm-1bfc7ab6a770babdcb3c83e4a8762a1b380a3bd4.zip
Switch inliner over to use DenseMap instead of std::map for ValueMap. This
speeds up the inliner 16%. llvm-svn: 33801
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneModule.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/CloneModule.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneModule.cpp b/llvm/lib/Transforms/Utils/CloneModule.cpp
index a4460fa69b1..d481aea0e53 100644
--- a/llvm/lib/Transforms/Utils/CloneModule.cpp
+++ b/llvm/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());
OpenPOWER on IntegriCloud