mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-17 06:33:21 +00:00
Fix an issue that Chris noticed, where local PRE was not properly instantiating
a new value numbering set after splitting a critical edge. This increases the number of instances of PRE on 403.gcc from ~60 to ~570. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60393 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bbe4105cd7
commit
912c49d169
@ -1299,6 +1299,7 @@ bool GVN::performPRE(Function& F) {
|
||||
|
||||
if (isCriticalEdge(PREPred->getTerminator(), succNum)) {
|
||||
toSplit.push_back(std::make_pair(PREPred->getTerminator(), succNum));
|
||||
Changed = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1361,10 +1362,14 @@ bool GVN::performPRE(Function& F) {
|
||||
}
|
||||
|
||||
for (SmallVector<std::pair<TerminatorInst*, unsigned>, 4>::iterator
|
||||
I = toSplit.begin(), E = toSplit.end(); I != E; ++I)
|
||||
I = toSplit.begin(), E = toSplit.end(); I != E; ++I) {
|
||||
SplitCriticalEdge(I->first, I->second, this);
|
||||
BasicBlock* NewBlock = I->first->getSuccessor(I->second);
|
||||
localAvail[NewBlock] =
|
||||
new ValueNumberScope(localAvail[I->first->getParent()]);
|
||||
}
|
||||
|
||||
return Changed || toSplit.size();
|
||||
return Changed;
|
||||
}
|
||||
|
||||
// iterateOnFunction - Executes one iteration of GVN
|
||||
|
Loading…
x
Reference in New Issue
Block a user