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

Owen Anderson resistor at mac.com
Mon Jun 5 21:36:49 PDT 2006



Changes in directory llvm/lib/Transforms/Scalar:

LCSSA.cpp updated: 1.14 -> 1.15
---
Log message:

Fix some formatting, and use inLoop() when appropriate.


---
Diffs of the changes:  (+3 -3)

 LCSSA.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Index: llvm/lib/Transforms/Scalar/LCSSA.cpp
diff -u llvm/lib/Transforms/Scalar/LCSSA.cpp:1.14 llvm/lib/Transforms/Scalar/LCSSA.cpp:1.15
--- llvm/lib/Transforms/Scalar/LCSSA.cpp:1.14	Mon Jun  5 23:28:30 2006
+++ llvm/lib/Transforms/Scalar/LCSSA.cpp	Mon Jun  5 23:36:36 2006
@@ -78,7 +78,8 @@
                                   
     /// inLoop - returns true if the given block is within the current loop
     const bool inLoop(BasicBlock* B) {
-           return std::binary_search(LoopBlocks.begin(), LoopBlocks.end(), B); }
+      return std::binary_search(LoopBlocks.begin(), LoopBlocks.end(), B);
+    }
   };
   
   RegisterOpt<LCSSA> X("lcssa", "Loop-Closed SSA Form Pass");
@@ -242,8 +243,7 @@
       for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); UI != E;
            ++UI) {
         BasicBlock *UserBB = cast<Instruction>(*UI)->getParent();
-        if (!std::binary_search(LoopBlocks.begin(), LoopBlocks.end(), UserBB))
-        {
+        if (!inLoop(UserBB)) {
           AffectedValues.insert(I);
           break;
         }






More information about the llvm-commits mailing list