mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 02:36:06 +00:00
Make PRE actually handle critical edges (by splitting them). Confirmed that bootstrap passes with this change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53762 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cfa94198d5
commit
e98c54c47c
@ -1136,8 +1136,11 @@ bool GVN::runOnFunction(Function& F) {
|
|||||||
changed |= shouldContinue;
|
changed |= shouldContinue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EnablePRE)
|
if (EnablePRE) {
|
||||||
changed |= performPRE(F);
|
bool PREChanged = false;
|
||||||
|
while (PREChanged = performPRE(F))
|
||||||
|
changed |= PREChanged;
|
||||||
|
}
|
||||||
|
|
||||||
return changed;
|
return changed;
|
||||||
}
|
}
|
||||||
@ -1336,7 +1339,7 @@ bool GVN::performPRE(Function& F) {
|
|||||||
I = toSplit.begin(), E = toSplit.end(); I != E; ++I)
|
I = toSplit.begin(), E = toSplit.end(); I != E; ++I)
|
||||||
SplitCriticalEdge(I->first, I->second, this);
|
SplitCriticalEdge(I->first, I->second, this);
|
||||||
|
|
||||||
return changed;
|
return changed || toSplit.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
// iterateOnFunction - Executes one iteration of GVN
|
// iterateOnFunction - Executes one iteration of GVN
|
||||||
|
Loading…
x
Reference in New Issue
Block a user