mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-14 15:38:57 +00:00
Do not try to optimize PHI nodes with incredibly high degree. This reduces SCCP
time from 615s to 1.49s on a large testcase that has a gigantic switch statement that all of the blocks in the function go to (an intepreter). llvm-svn: 12442
This commit is contained in:
parent
2175b35b46
commit
dc22f37eb5
@ -500,6 +500,13 @@ void SCCP::visitPHINode(PHINode &PN) {
|
||||
return; // Quick exit
|
||||
}
|
||||
|
||||
// Super-extra-high-degree PHI nodes are unlikely to ever be marked constant,
|
||||
// and slow us down a lot. Just mark them overdefined.
|
||||
if (PN.getNumIncomingValues() > 64) {
|
||||
markOverdefined(PNIV, &PN);
|
||||
return;
|
||||
}
|
||||
|
||||
// Look at all of the executable operands of the PHI node. If any of them
|
||||
// are overdefined, the PHI becomes overdefined as well. If they are all
|
||||
// constant, and they agree with each other, the PHI becomes the identical
|
||||
|
Loading…
x
Reference in New Issue
Block a user