commit | 92103de8ce59f37dfab6607ef066d3875f9146ee | [log] [tgz] |
---|---|---|
author | Chris Lattner <sabre@nondot.org> | Tue Aug 28 04:23:55 2007 +0000 |
committer | Chris Lattner <sabre@nondot.org> | Tue Aug 28 04:23:55 2007 +0000 |
tree | 1e184ba185e621fc27a04470dc373b66de02f478 | |
parent | 1cd39a4f6e9d7be7de395e5895ea48b3de6a1792 [diff] [blame] |
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
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 416e1f0..218da97 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -8283,6 +8283,10 @@ // 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);