diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-01-28 05:48:15 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-01-28 05:48:15 +0000 |
commit | 07317f7d333fd03ae216865a6f0e8b3bde5f030d (patch) | |
tree | 73fb818b95f7008e7a1a4ba3c381a6b23d06adbb /lib/Transforms/IPO/MergeFunctions.cpp | |
parent | 26859587fddce83660cbce8b0f21316ab8fae2e3 (diff) |
Reduce the number of functions we look at in the first pass, and preallocate
the function equality set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124475 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/MergeFunctions.cpp')
-rw-r--r-- | lib/Transforms/IPO/MergeFunctions.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/MergeFunctions.cpp b/lib/Transforms/IPO/MergeFunctions.cpp index d4ecd55d03..30afaab47c 100644 --- a/lib/Transforms/IPO/MergeFunctions.cpp +++ b/lib/Transforms/IPO/MergeFunctions.cpp @@ -798,8 +798,10 @@ bool MergeFunctions::runOnModule(Module &M) { TD = getAnalysisIfAvailable<TargetData>(); for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) { - Deferred.push_back(WeakVH(I)); + if (!I->isDeclaration() && !I->hasAvailableExternallyLinkage()) + Deferred.push_back(WeakVH(I)); } + FnSet.resize(Deferred.size()); do { std::vector<WeakVH> Worklist; |