aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-08-28 04:23:55 +0000
committerChris Lattner <sabre@nondot.org>2007-08-28 04:23:55 +0000
commitadf2e34ef48d49c38d6bec9913669b307c2a0b84 (patch)
tree1e184ba185e621fc27a04470dc373b66de02f478 /lib
parentac7c7c20c27f30c8da64d2e48d95b4ea26760d84 (diff)
downloadexternal_llvm-adf2e34ef48d49c38d6bec9913669b307c2a0b84.tar.gz
external_llvm-adf2e34ef48d49c38d6bec9913669b307c2a0b84.tar.bz2
external_llvm-adf2e34ef48d49c38d6bec9913669b307c2a0b84.zip
Cut off crazy computation. This helps PR1622 slightly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41522 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/Scalar/InstructionCombining.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp
index 416e1f012a..218da9773d 100644
--- a/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -8283,6 +8283,10 @@ static bool DeadPHICycle(PHINode *PN,
// Remember this node, and if we find the cycle, return.
if (!PotentiallyDeadPHIs.insert(PN))
return true;
+
+ // Don't scan crazily complex things.
+ if (PotentiallyDeadPHIs.size() == 16)
+ return false;
if (PHINode *PU = dyn_cast<PHINode>(PN->use_back()))
return DeadPHICycle(PU, PotentiallyDeadPHIs);