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
This commit is contained in:
Chris Lattner
2007-02-03 00:08:31 +00:00
parent 4642ca6589
commit 5e665f5594
9 changed files with 49 additions and 46 deletions

View File

@ -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());