[llvm-commits] CVS: llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp InstructionCombining.cpp Reg2Mem.cpp

Chris Lattner sabre at nondot.org
Sat May 5 15:32:42 PDT 2007



Changes in directory llvm/lib/Transforms/Scalar:

CorrelatedExprs.cpp updated: 1.60 -> 1.61
InstructionCombining.cpp updated: 1.758 -> 1.759
Reg2Mem.cpp updated: 1.15 -> 1.16
---
Log message:

wrap long lines


---
Diffs of the changes:  (+15 -14)

 CorrelatedExprs.cpp      |   10 +++++-----
 InstructionCombining.cpp |   16 ++++++++--------
 Reg2Mem.cpp              |    3 ++-
 3 files changed, 15 insertions(+), 14 deletions(-)


Index: llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp
diff -u llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.60 llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.61
--- llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp:1.60	Wed May  2 20:11:54 2007
+++ llvm/lib/Transforms/Scalar/CorrelatedExprs.cpp	Sat May  5 17:32:24 2007
@@ -353,9 +353,9 @@
   //
   std::vector<BasicBlock*> children;
   EF->getChildren(BB, children);
-  if (!RI.empty()) {        // Time opt: only propagate if we can change something
-    for (std::vector<BasicBlock*>::iterator CI = children.begin(), E = children.end();
-         CI != E; ++CI) {
+  if (!RI.empty()) {     // Time opt: only propagate if we can change something
+    for (std::vector<BasicBlock*>::iterator CI = children.begin(), 
+         E = children.end(); CI != E; ++CI) {
       assert(RegionInfoMap.find(*CI) == RegionInfoMap.end() &&
              "RegionInfo should be calculated in dominanace order!");
       getRegionInfo(*CI) = RI;
@@ -383,8 +383,8 @@
     }
 
   // Now that all of our successors have information, recursively process them.
-  for (std::vector<BasicBlock*>::iterator CI = children.begin(), E = children.end();
-       CI != E; ++CI)
+  for (std::vector<BasicBlock*>::iterator CI = children.begin(), 
+       E = children.end(); CI != E; ++CI)
     Changed |= TransformRegion(*CI, VisitedBlocks);
 
   return Changed;


Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.758 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.759
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.758	Fri May  4 20:59:31 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp	Sat May  5 17:32:24 2007
@@ -6419,7 +6419,7 @@
               Offset += TySize;
               assert(Offset >= 0);
             }
-            assert((uint64_t)Offset < (uint64_t)TySize && "Out of range offset");
+            assert((uint64_t)Offset < (uint64_t)TySize &&"Out of range offset");
           }
           
           NewIndices.push_back(ConstantInt::get(IntPtrTy, FirstIdx));
@@ -6932,8 +6932,8 @@
       if (Instruction *V = PromoteCastOfAllocation(CI, *AI))
         return V;
     
-    // If the source and destination are pointers, and this cast is equivalent to
-    // a getelementptr X, 0, 0, 0...  turn it into the appropriate getelementptr.
+    // If the source and destination are pointers, and this cast is equivalent
+    // to a getelementptr X, 0, 0, 0...  turn it into the appropriate gep.
     // This can enhance SROA and other transforms that want type-safe pointers.
     Constant *ZeroUInt = Constant::getNullValue(Type::Int32Ty);
     unsigned NumZeros = 0;
@@ -8973,15 +8973,15 @@
     if (!OtherStore || OtherStore->getOperand(1) != SI.getOperand(1))
       return false;
   } else {
-    // Otherwise, the other block ended with a conditional branch.  If one of the
+    // Otherwise, the other block ended with a conditional branch. If one of the
     // destinations is StoreBB, then we have the if/then case.
     if (OtherBr->getSuccessor(0) != StoreBB && 
         OtherBr->getSuccessor(1) != StoreBB)
       return false;
     
     // Okay, we know that OtherBr now goes to Dest and StoreBB, so this is an
-    // if/then triangle.  See if there is a store to the same ptr as SI that lives
-    // in OtherBB.
+    // if/then triangle.  See if there is a store to the same ptr as SI that
+    // lives in OtherBB.
     for (;; --BBI) {
       // Check to see if we find the matching store.
       if ((OtherStore = dyn_cast<StoreInst>(BBI))) {
@@ -8989,8 +8989,8 @@
           return false;
         break;
       }
-      // If we find something that may be using the stored value, or if we run out
-      // of instructions, we can't do the xform.
+      // If we find something that may be using the stored value, or if we run
+      // out of instructions, we can't do the xform.
       if (isa<LoadInst>(BBI) || BBI->mayWriteToMemory() ||
           BBI == OtherBB->begin())
         return false;


Index: llvm/lib/Transforms/Scalar/Reg2Mem.cpp
diff -u llvm/lib/Transforms/Scalar/Reg2Mem.cpp:1.15 llvm/lib/Transforms/Scalar/Reg2Mem.cpp:1.16
--- llvm/lib/Transforms/Scalar/Reg2Mem.cpp:1.15	Wed May  2 20:11:54 2007
+++ llvm/lib/Transforms/Scalar/Reg2Mem.cpp	Sat May  5 17:32:24 2007
@@ -55,7 +55,8 @@
       if (!F.isDeclaration()) {
         //give us a clean block
         BasicBlock* bbold = &F.getEntryBlock();
-        BasicBlock* bbnew = new BasicBlock("allocablock", &F, &F.getEntryBlock());
+        BasicBlock* bbnew = new BasicBlock("allocablock", &F, 
+                                           &F.getEntryBlock());
         new BranchInst(bbold, bbnew);
 
         //find the instructions






More information about the llvm-commits mailing list