diff options
author | Chris Lattner <sabre@nondot.org> | 2003-10-06 15:23:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-10-06 15:23:43 +0000 |
commit | 5f92e2b11f68624f9003e710f44e3bc324cbf89a (patch) | |
tree | e5d94cf5d4818c88a23f50a92090fd91cb5a379c /lib/Transforms/Utils/InlineFunction.cpp | |
parent | d5a310e4b3251410d4afd58ccea5ec7f0cb13d5f (diff) |
Avoid doing pointless work. Amazingly, this makes us go faster.
Running the inliner on 252.eon used to take 48.4763s, now it takes 14.4148s.
In release mode, it went from taking 25.8741s to taking 11.5712s.
This also fixes a FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8890 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r-- | lib/Transforms/Utils/InlineFunction.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/Transforms/Utils/InlineFunction.cpp b/lib/Transforms/Utils/InlineFunction.cpp index 22377b759c..01ffb253e4 100644 --- a/lib/Transforms/Utils/InlineFunction.cpp +++ b/lib/Transforms/Utils/InlineFunction.cpp @@ -124,14 +124,6 @@ bool InlineFunction(CallSite CS) { // Make a vector to capture the return instructions in the cloned function... std::vector<ReturnInst*> Returns; - // Populate the value map with all of the globals in the program. - // FIXME: This should be the default for CloneFunctionInto! - Module &M = *Caller->getParent(); - for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) - ValueMap[I] = I; - for (Module::giterator I = M.gbegin(), E = M.gend(); I != E; ++I) - ValueMap[I] = I; - // Do all of the hard part of cloning the callee into the caller... CloneFunctionInto(Caller, CalledFunc, ValueMap, Returns, ".i"); |