diff options
author | Owen Anderson <resistor@mac.com> | 2008-04-29 06:34:55 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2008-04-29 06:34:55 +0000 |
commit | 304ef22f6ed8443f3834c590269323dfd581e55b (patch) | |
tree | b38376ffab2bdc783993f6a3024371b497ea9b2a /llvm/lib/Transforms | |
parent | 141d2dfd430536bc32291c5f8ba4adc56177e77e (diff) | |
download | bcm5719-llvm-304ef22f6ed8443f3834c590269323dfd581e55b.tar.gz bcm5719-llvm-304ef22f6ed8443f3834c590269323dfd581e55b.zip |
Clarify what we mean by a dead loop.
llvm-svn: 50406
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/DeadLoopElimination.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/DeadLoopElimination.cpp b/llvm/lib/Transforms/Scalar/DeadLoopElimination.cpp index 3ae59c32f58..fc11cab809d 100644 --- a/llvm/lib/Transforms/Scalar/DeadLoopElimination.cpp +++ b/llvm/lib/Transforms/Scalar/DeadLoopElimination.cpp @@ -126,6 +126,10 @@ bool DeadLoopElimination::IsLoopDead(Loop* L) { return true; } +/// runOnLoop - Remove dead loops, by which we mean loops that do not impact the +/// observable behavior of the program other than finite running time. Note +/// we do ensure that this never remove a loop that might be infinite, as doing +/// so could change the halting/non-halting nature of a program. bool DeadLoopElimination::runOnLoop(Loop* L, LPPassManager& LPM) { // Don't remove loops for which we can't solve the trip count. // They could be infinite, in which case we'd be changing program behavior. |