[llvm-commits] CVS: llvm/lib/Transforms/Scalar/GCSE.cpp InstructionCombining.cpp LICM.cpp LoopRotation.cpp PredicateSimplifier.cpp SCCP.cpp

Chris Lattner sabre at nondot.org
Sat Apr 14 16:32:23 PDT 2007



Changes in directory llvm/lib/Transforms/Scalar:

GCSE.cpp updated: 1.52 -> 1.53
InstructionCombining.cpp updated: 1.745 -> 1.746
LICM.cpp updated: 1.89 -> 1.90
LoopRotation.cpp updated: 1.9 -> 1.10
PredicateSimplifier.cpp updated: 1.66 -> 1.67
SCCP.cpp updated: 1.164 -> 1.165
---
Log message:

fix long lines


---
Diffs of the changes:  (+20 -18)

 GCSE.cpp                 |    2 +-
 InstructionCombining.cpp |   17 +++++++++--------
 LICM.cpp                 |    2 +-
 LoopRotation.cpp         |    4 ++--
 PredicateSimplifier.cpp  |    5 +++--
 SCCP.cpp                 |    8 ++++----
 6 files changed, 20 insertions(+), 18 deletions(-)


Index: llvm/lib/Transforms/Scalar/GCSE.cpp
diff -u llvm/lib/Transforms/Scalar/GCSE.cpp:1.52 llvm/lib/Transforms/Scalar/GCSE.cpp:1.53
--- llvm/lib/Transforms/Scalar/GCSE.cpp:1.52	Mon Feb  5 17:32:05 2007
+++ llvm/lib/Transforms/Scalar/GCSE.cpp	Sat Apr 14 18:32:02 2007
@@ -73,7 +73,7 @@
   // Check for value numbers of arguments.  If the value numbering
   // implementation can prove that an incoming argument is a constant or global
   // value address, substitute it, making the argument dead.
-  for (Function::arg_iterator AI = F.arg_begin(), E = F.arg_end(); AI != E; ++AI)
+  for (Function::arg_iterator AI = F.arg_begin(), E = F.arg_end(); AI != E;++AI)
     if (!AI->use_empty()) {
       VN.getEqualNumberNodes(AI, EqualValues);
       if (!EqualValues.empty()) {


Index: llvm/lib/Transforms/Scalar/InstructionCombining.cpp
diff -u llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.745 llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.746
--- llvm/lib/Transforms/Scalar/InstructionCombining.cpp:1.745	Sat Apr 14 18:02:14 2007
+++ llvm/lib/Transforms/Scalar/InstructionCombining.cpp	Sat Apr 14 18:32:02 2007
@@ -5523,8 +5523,8 @@
       }
     }
   } else {  // Not a ICMP_EQ/ICMP_NE
-            // If the LHS is a cast from an integral value of the same size, then 
-            // since we know the RHS is a constant, try to simlify.
+            // If the LHS is a cast from an integral value of the same size, 
+            // then since we know the RHS is a constant, try to simlify.
     if (CastInst *Cast = dyn_cast<CastInst>(LHSI)) {
       Value *CastOp = Cast->getOperand(0);
       const Type *SrcTy = CastOp->getType();
@@ -6231,7 +6231,7 @@
           MaskedValueIsZero(I->getOperand(0),
             APInt::getHighBitsSet(OrigBitWidth, OrigBitWidth-BitWidth)) &&
           CI->getLimitedValue(BitWidth) < BitWidth) {
-        return CanEvaluateInDifferentType(I->getOperand(0), Ty, NumCastsRemoved);
+        return CanEvaluateInDifferentType(I->getOperand(0), Ty,NumCastsRemoved);
       }
     }
     break;
@@ -6645,7 +6645,7 @@
         Value *Sh = ConstantInt::get(In->getType(),
                                     In->getType()->getPrimitiveSizeInBits()-1);
         In = InsertNewInstBefore(BinaryOperator::createLShr(In, Sh,
-                                                        In->getName()+".lobit"), 
+                                                        In->getName()+".lobit"),
                                  CI);
         if (In->getType() != CI.getType())
           In = CastInst::createIntegerCast(In, CI.getType(),
@@ -6654,7 +6654,7 @@
         if (ICI->getPredicate() == ICmpInst::ICMP_SGT) {
           Constant *One = ConstantInt::get(In->getType(), 1);
           In = InsertNewInstBefore(BinaryOperator::createXor(In, One,
-                                                          In->getName()+".not"), 
+                                                          In->getName()+".not"),
                                    CI);
         }
 
@@ -6742,7 +6742,7 @@
         Value *Sh = ConstantInt::get(In->getType(),
                                      In->getType()->getPrimitiveSizeInBits()-1);
         In = InsertNewInstBefore(BinaryOperator::createAShr(In, Sh,
-                                                        In->getName()+".lobit"), 
+                                                        In->getName()+".lobit"),
                                  CI);
         if (In->getType() != CI.getType())
           In = CastInst::createIntegerCast(In, CI.getType(),
@@ -7484,7 +7484,7 @@
           for (unsigned i = 0; i != 16; ++i) {
             if (isa<UndefValue>(Mask->getOperand(i)))
               continue;
-            unsigned Idx =cast<ConstantInt>(Mask->getOperand(i))->getZExtValue();
+            unsigned Idx=cast<ConstantInt>(Mask->getOperand(i))->getZExtValue();
             Idx &= 31;  // Match the hardware behavior.
             
             if (ExtractedElts[Idx] == 0) {
@@ -9331,7 +9331,8 @@
     if (isa<ConstantInt>(EI->getOperand(1)) && isa<ConstantInt>(IdxOp) &&
         EI->getOperand(0)->getType() == IE.getType()) {
       unsigned NumVectorElts = IE.getType()->getNumElements();
-      unsigned ExtractedIdx=cast<ConstantInt>(EI->getOperand(1))->getZExtValue();
+      unsigned ExtractedIdx =
+        cast<ConstantInt>(EI->getOperand(1))->getZExtValue();
       unsigned InsertedIdx = cast<ConstantInt>(IdxOp)->getZExtValue();
       
       if (ExtractedIdx >= NumVectorElts) // Out of range extract.


Index: llvm/lib/Transforms/Scalar/LICM.cpp
diff -u llvm/lib/Transforms/Scalar/LICM.cpp:1.89 llvm/lib/Transforms/Scalar/LICM.cpp:1.90
--- llvm/lib/Transforms/Scalar/LICM.cpp:1.89	Thu Mar 22 11:38:57 2007
+++ llvm/lib/Transforms/Scalar/LICM.cpp	Sat Apr 14 18:32:02 2007
@@ -240,7 +240,7 @@
   for (std::vector<BasicBlock*>::const_iterator I = L->getBlocks().begin(),
          E = L->getBlocks().end(); I != E; ++I)
     if (LI->getLoopFor(*I) == L)        // Ignore blocks in subloops...
-      CurAST->add(**I);                     // Incorporate the specified basic block
+      CurAST->add(**I);                 // Incorporate the specified basic block
 
   // We want to visit all of the instructions in this loop... that are not parts
   // of our subloops (they have already had their invariants hoisted out of


Index: llvm/lib/Transforms/Scalar/LoopRotation.cpp
diff -u llvm/lib/Transforms/Scalar/LoopRotation.cpp:1.9 llvm/lib/Transforms/Scalar/LoopRotation.cpp:1.10
--- llvm/lib/Transforms/Scalar/LoopRotation.cpp:1.9	Mon Apr  9 17:20:10 2007
+++ llvm/lib/Transforms/Scalar/LoopRotation.cpp	Sat Apr 14 18:32:02 2007
@@ -315,7 +315,7 @@
       // Used inside Exit Block. Since we are in LCSSA form, U must be PHINode.
       assert (U->getParent() == Exit 
               && "Need to propagate new PHI into Exit blocks");
-      assert (isa<PHINode>(U) && "Use in Exit Block that is not PHINode");        
+      assert (isa<PHINode>(U) && "Use in Exit Block that is not PHINode");
 
       PHINode *UPhi = cast<PHINode>(U);
 
@@ -372,7 +372,7 @@
     Value *V = PN->getIncomingValueForBlock(OrigHeader);
     if (isa<Instruction>(V) && 
         (ILoopHeaderInfo = findReplacementData(cast<Instruction>(V)))) {
-      assert (ILoopHeaderInfo->PreHeader && "Missing New Preheader Instruction");
+      assert(ILoopHeaderInfo->PreHeader && "Missing New Preheader Instruction");
       PN->addIncoming(ILoopHeaderInfo->PreHeader, OrigPreHeader);
     } else {
       PN->addIncoming(V, OrigPreHeader);


Index: llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp
diff -u llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.66 llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.67
--- llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp:1.66	Sat Apr  7 10:48:32 2007
+++ llvm/lib/Transforms/Scalar/PredicateSimplifier.cpp	Sat Apr 14 18:32:02 2007
@@ -339,7 +339,7 @@
             for (iterator B = begin(); I->To == n; --I) {
               if (I->Subtree->DominatedBy(Subtree)) {
                 LatticeVal LV = static_cast<LatticeVal>(I->LV & R);
-                assert(validPredicate(LV) && "Invalid union of lattice values.");
+                assert(validPredicate(LV) && "Invalid union of lattice values");
                 I->LV = LV;
               }
               if (I == B) break;
@@ -2119,7 +2119,8 @@
 
     TargetData *TD = &getAnalysis<TargetData>();
 
-    Forest->updateDFSNumbers(); // XXX: should only act when numbers are out of date
+    // XXX: should only act when numbers are out of date
+    Forest->updateDFSNumbers();
 
     DOUT << "Entering Function: " << F.getName() << "\n";
 


Index: llvm/lib/Transforms/Scalar/SCCP.cpp
diff -u llvm/lib/Transforms/Scalar/SCCP.cpp:1.164 llvm/lib/Transforms/Scalar/SCCP.cpp:1.165
--- llvm/lib/Transforms/Scalar/SCCP.cpp:1.164	Sat Mar  3 22:50:21 2007
+++ llvm/lib/Transforms/Scalar/SCCP.cpp	Sat Apr 14 18:32:02 2007
@@ -925,9 +925,9 @@
                                                     IdxState.getConstant()));
   else if (ValState.isUndefined() && EltState.isConstant() &&
            IdxState.isConstant()) 
-    markConstant(&I, ConstantExpr::getInsertElement(UndefValue::get(I.getType()),
-                                                    EltState.getConstant(),
-                                                    IdxState.getConstant()));
+    markConstant(&I,ConstantExpr::getInsertElement(UndefValue::get(I.getType()),
+                                                   EltState.getConstant(),
+                                                   IdxState.getConstant()));
 #endif
 }
 
@@ -1365,7 +1365,7 @@
   Solver.MarkBlockExecutable(F.begin());
 
   // Mark all arguments to the function as being overdefined.
-  for (Function::arg_iterator AI = F.arg_begin(), E = F.arg_end(); AI != E; ++AI)
+  for (Function::arg_iterator AI = F.arg_begin(), E = F.arg_end(); AI != E;++AI)
     Solver.markOverdefined(AI);
 
   // Solve for constants.






More information about the llvm-commits mailing list