[llvm-commits] [llvm] r50406 - /llvm/trunk/lib/Transforms/Scalar/DeadLoopElimination.cpp

Owen Anderson resistor at mac.com
Mon Apr 28 23:34:56 PDT 2008


Author: resistor
Date: Tue Apr 29 01:34:55 2008
New Revision: 50406

URL: http://llvm.org/viewvc/llvm-project?rev=50406&view=rev
Log:
Clarify what we mean by a dead loop.

Modified:
    llvm/trunk/lib/Transforms/Scalar/DeadLoopElimination.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/DeadLoopElimination.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/DeadLoopElimination.cpp?rev=50406&r1=50405&r2=50406&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/DeadLoopElimination.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/DeadLoopElimination.cpp Tue Apr 29 01:34:55 2008
@@ -126,6 +126,10 @@
   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.





More information about the llvm-commits mailing list