From 5e665f559419c7f58a4fd9360cd488f065505c44 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 3 Feb 2007 00:08:31 +0000 Subject: 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 --- lib/Transforms/Utils/CloneModule.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/Transforms/Utils/CloneModule.cpp') 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 ValueMap; - + DenseMap ValueMap; return CloneModule(M, ValueMap); } -Module *llvm::CloneModule(const Module *M, std::map &ValueMap) { +Module *llvm::CloneModule(const Module *M, + DenseMap &ValueMap) { // First off, we need to create the new module... Module *New = new Module(M->getModuleIdentifier()); New->setDataLayout(M->getDataLayout()); -- cgit v1.2.3