diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-08-28 04:23:55 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-08-28 04:23:55 +0000 |
| commit | 0e258b8518926bc83f99ea9556b790d94f4130b4 (patch) | |
| tree | 2af10866bd37c2b85e7a24d74808672d2ce76ae0 /llvm/lib/Transforms/Scalar/InstructionCombining.cpp | |
| parent | 7e6f7c25bf328f8f5ee7d8671a895b39d138d6ce (diff) | |
| download | bcm5719-llvm-0e258b8518926bc83f99ea9556b790d94f4130b4.tar.gz bcm5719-llvm-0e258b8518926bc83f99ea9556b790d94f4130b4.zip | |
Cut off crazy computation. This helps PR1622 slightly.
llvm-svn: 41522
Diffstat (limited to 'llvm/lib/Transforms/Scalar/InstructionCombining.cpp')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 416e1f012a6..218da9773d1 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/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); |

