From: Nick Lewycky Date: Fri, 28 Jan 2011 05:48:15 +0000 (+0000) Subject: Reduce the number of functions we look at in the first pass, and preallocate X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=07317f7d333fd03ae216865a6f0e8b3bde5f030d;p=oota-llvm.git 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 --- diff --git a/lib/Transforms/IPO/MergeFunctions.cpp b/lib/Transforms/IPO/MergeFunctions.cpp index d4ecd55d033..30afaab47cf 100644 --- a/lib/Transforms/IPO/MergeFunctions.cpp +++ b/lib/Transforms/IPO/MergeFunctions.cpp @@ -798,8 +798,10 @@ bool MergeFunctions::runOnModule(Module &M) { TD = getAnalysisIfAvailable(); 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 Worklist;