[llvm-commits] CVS: llvm/lib/Transforms/Utils/LoopSimplify.cpp

Owen Anderson resistor at mac.com
Mon Apr 9 15:55:07 PDT 2007



Changes in directory llvm/lib/Transforms/Utils:

LoopSimplify.cpp updated: 1.87 -> 1.88
---
Log message:

Const-ify some parameters, and some cosmetic cleanups.  No functionality 
change.


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

 LoopSimplify.cpp |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)


Index: llvm/lib/Transforms/Utils/LoopSimplify.cpp
diff -u llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.87 llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.88
--- llvm/lib/Transforms/Utils/LoopSimplify.cpp:1.87	Mon Apr  9 17:31:43 2007
+++ llvm/lib/Transforms/Utils/LoopSimplify.cpp	Mon Apr  9 17:54:50 2007
@@ -419,8 +419,8 @@
 
 /// FindPHIToPartitionLoops - The first part of loop-nestification is to find a
 /// PHI node that tells us how to partition the loops.
-static PHINode *FindPHIToPartitionLoops(Loop *L, ETForest *EF, 
-          AliasAnalysis *AA) {
+static PHINode *FindPHIToPartitionLoops(Loop *L, ETForest *EF,
+                                        AliasAnalysis *AA) {
   for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ) {
     PHINode *PN = cast<PHINode>(I);
     ++I;
@@ -675,7 +675,7 @@
 
 // Returns true if BasicBlock A dominates at least one block in vector B
 // Helper function for UpdateDomInfoForRevectoredPreds
-static bool BlockDominatesAny(BasicBlock* A, std::vector<BasicBlock*>& B, ETForest& ETF) {
+static bool BlockDominatesAny(BasicBlock* A, const std::vector<BasicBlock*>& B, const ETForest& ETF) {
   for (std::vector<BasicBlock*>::iterator BI = B.begin(), BE = B.end(); BI != BE; ++BI) {
     if (ETF.dominates(A, *BI))
       return true;
@@ -858,6 +858,7 @@
       
       // Only consider dominators of NewBBSucc
       if (!DFI->second.count(NewBBSucc)) continue;
+      
       if (BlockDominatesAny(FI, PredBlocks, ETF)) {
         // If NewBBSucc should not stay in our dominator frontier, remove it.
         // We remove it unless there is a predecessor of NewBBSucc that we






More information about the llvm-commits mailing list