[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopPreheaders.cpp

Chris Lattner lattner at cs.uiuc.edu
Mon Aug 18 17:55:02 PDT 2003


Changes in directory llvm/lib/Transforms/Scalar:

LoopPreheaders.cpp updated: 1.13 -> 1.14

---
Log message:

Fix grammar, add comment


---
Diffs of the changes:

Index: llvm/lib/Transforms/Scalar/LoopPreheaders.cpp
diff -u llvm/lib/Transforms/Scalar/LoopPreheaders.cpp:1.13 llvm/lib/Transforms/Scalar/LoopPreheaders.cpp:1.14
--- llvm/lib/Transforms/Scalar/LoopPreheaders.cpp:1.13	Mon Aug 18 09:33:38 2003
+++ llvm/lib/Transforms/Scalar/LoopPreheaders.cpp	Mon Aug 18 17:54:06 2003
@@ -10,7 +10,7 @@
 // Loop exit-block insertion guarantees that all exit blocks from the loop
 // (blocks which are outside of the loop that have predecessors inside of the
 // loop) are dominated by the loop header.  This simplifies transformations such
-// as store-sinking that is built into LICM.
+// as store-sinking that are built into LICM.
 //
 // Note that the simplifycfg pass will clean up blocks which are split out but
 // end up being unnecessary, so usage of this pass does not neccesarily
@@ -91,6 +91,9 @@
     Changed = true;
   }
 
+  // Regardless of whether or not we added a preheader to the loop we must
+  // guarantee that the preheader dominates all exit nodes.  If there are any
+  // exit nodes not dominated, split them now.
   DominatorSet &DS = getAnalysis<DominatorSet>();
   BasicBlock *Header = L->getHeader();
   for (unsigned i = 0, e = L->getExitBlocks().size(); i != e; ++i)





More information about the llvm-commits mailing list