aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-04-29 06:34:55 +0000
committerOwen Anderson <resistor@mac.com>2008-04-29 06:34:55 +0000
commit7fb4a8a4d8479d1d47d93a4c712f40805dfcc471 (patch)
tree2117327787ebf981b7f1dde1d6c7248a595b4388 /lib/Transforms/Scalar
parent97b0f0be8aaffcfdc6c36d8f7bf35f5edab2fb34 (diff)
downloadexternal_llvm-7fb4a8a4d8479d1d47d93a4c712f40805dfcc471.zip
external_llvm-7fb4a8a4d8479d1d47d93a4c712f40805dfcc471.tar.gz
external_llvm-7fb4a8a4d8479d1d47d93a4c712f40805dfcc471.tar.bz2
Clarify what we mean by a dead loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50406 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar')
-rw-r--r--lib/Transforms/Scalar/DeadLoopElimination.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/DeadLoopElimination.cpp b/lib/Transforms/Scalar/DeadLoopElimination.cpp
index 3ae59c3..fc11cab 100644
--- a/lib/Transforms/Scalar/DeadLoopElimination.cpp
+++ b/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.