[llvm-commits] CVS: llvm/lib/Transforms/ExprTypeConvert.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Mar 16 13:54:02 PST 2004
Changes in directory llvm/lib/Transforms:
ExprTypeConvert.cpp updated: 1.89 -> 1.90
---
Log message:
Punt if we see gigantic PHI nodes. This improves a huge interpreter loop
testcase from 32.5s in -raise to take .3s
---
Diffs of the changes: (+6 -0)
Index: llvm/lib/Transforms/ExprTypeConvert.cpp
diff -u llvm/lib/Transforms/ExprTypeConvert.cpp:1.89 llvm/lib/Transforms/ExprTypeConvert.cpp:1.90
--- llvm/lib/Transforms/ExprTypeConvert.cpp:1.89 Sun Feb 8 22:13:57 2004
+++ llvm/lib/Transforms/ExprTypeConvert.cpp Tue Mar 16 13:52:53 2004
@@ -206,6 +206,9 @@
}
case Instruction::PHI: {
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)
if (!ExpressionConvertibleToType(PN->getIncomingValue(i), Ty, CTMap, TD))
return false;
@@ -815,6 +818,9 @@
case Instruction::PHI: {
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)
if (!ExpressionConvertibleToType(PN->getIncomingValue(i), Ty, CTMap, TD))
return false;
More information about the llvm-commits
mailing list