mirror of
https://github.com/RPCSX/llvm.git
synced 2025-03-06 20:09:02 +00:00
Punt if we see gigantic PHI nodes. This improves a huge interpreter loop
testcase from 32.5s in -raise to take .3s git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12443 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a2f652d420
commit
91408eba18
@ -206,6 +206,9 @@ bool llvm::ExpressionConvertibleToType(Value *V, const Type *Ty,
|
|||||||
}
|
}
|
||||||
case Instruction::PHI: {
|
case Instruction::PHI: {
|
||||||
PHINode *PN = cast<PHINode>(I);
|
PHINode *PN = cast<PHINode>(I);
|
||||||
|
// Be conservative if we find a giant PHI node.
|
||||||
|
if (PN->getNumIncomingValues() > 32) return false;
|
||||||
|
|
||||||
for (unsigned i = 0; i < PN->getNumIncomingValues(); ++i)
|
for (unsigned i = 0; i < PN->getNumIncomingValues(); ++i)
|
||||||
if (!ExpressionConvertibleToType(PN->getIncomingValue(i), Ty, CTMap, TD))
|
if (!ExpressionConvertibleToType(PN->getIncomingValue(i), Ty, CTMap, TD))
|
||||||
return false;
|
return false;
|
||||||
@ -815,6 +818,9 @@ static bool OperandConvertibleToType(User *U, Value *V, const Type *Ty,
|
|||||||
|
|
||||||
case Instruction::PHI: {
|
case Instruction::PHI: {
|
||||||
PHINode *PN = cast<PHINode>(I);
|
PHINode *PN = cast<PHINode>(I);
|
||||||
|
// Be conservative if we find a giant PHI node.
|
||||||
|
if (PN->getNumIncomingValues() > 32) return false;
|
||||||
|
|
||||||
for (unsigned i = 0; i < PN->getNumIncomingValues(); ++i)
|
for (unsigned i = 0; i < PN->getNumIncomingValues(); ++i)
|
||||||
if (!ExpressionConvertibleToType(PN->getIncomingValue(i), Ty, CTMap, TD))
|
if (!ExpressionConvertibleToType(PN->getIncomingValue(i), Ty, CTMap, TD))
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user