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
This commit is contained in:
Nick Lewycky 2011-01-28 05:48:15 +00:00
parent 26859587fd
commit 07317f7d33

View File

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