[llvm-commits] [llvm] r50582 - /llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp

Chris Lattner sabre at nondot.org
Fri May 2 10:18:31 PDT 2008


Author: lattner
Date: Fri May  2 12:18:31 2008
New Revision: 50582

URL: http://llvm.org/viewvc/llvm-project?rev=50582&view=rev
Log:
add a FIXME so we remember to eventually remove this code.

Modified:
    llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp?rev=50582&r1=50581&r2=50582&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopRotation.cpp Fri May  2 12:18:31 2008
@@ -249,8 +249,8 @@
     // create new PHINode for this instruction.
     Instruction *NewHeaderReplacement = NULL;
     if (usedOutsideOriginalHeader(In)) {
-      const StructType *STy = dyn_cast<StructType>(In->getType());
-      if (STy) {
+      // FIXME: remove this when we have first-class aggregates.
+      if (isa<StructType>(In->getType())) {
         // Can't create PHI nodes for this type.  If there are any getResults
         // not defined in this block, move them back to this block.  PHI
         // nodes will be created for all getResults later.
@@ -261,14 +261,15 @@
             ++InsertPoint;
         } else {
           InsertPoint = I;  // call
-          InsertPoint++;
+          ++InsertPoint;
         }
         for (Value::use_iterator UI = In->use_begin(), UE = In->use_end();
              UI != UE; ++UI) {
           GetResultInst *InGR = cast<GetResultInst>(UI);
           if (InGR->getParent() != OrigHeader) {
-            // move InGR to immediately follow call.  It will be picked
-            // up, cloned and PHI'd on the next iteration.
+            // Move InGR to immediately after the call or in the normal dest of
+            // the invoke.  It will be picked up, cloned and PHI'd on the next
+            // iteration.
             InGR->moveBefore(InsertPoint);
           }
         }





More information about the llvm-commits mailing list