From: Chris Lattner Date: Fri, 2 May 2008 17:18:31 +0000 (+0000) Subject: add a FIXME so we remember to eventually remove this code. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4446997e0a23c58940f587eaf5d2f6d745821a02;p=oota-llvm.git add a FIXME so we remember to eventually remove this code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50582 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/LoopRotation.cpp b/lib/Transforms/Scalar/LoopRotation.cpp index 0e31ece4b34..91a96bcedac 100644 --- a/lib/Transforms/Scalar/LoopRotation.cpp +++ b/lib/Transforms/Scalar/LoopRotation.cpp @@ -249,8 +249,8 @@ bool LoopRotate::rotateLoop(Loop *Lp, LPPassManager &LPM) { // create new PHINode for this instruction. Instruction *NewHeaderReplacement = NULL; if (usedOutsideOriginalHeader(In)) { - const StructType *STy = dyn_cast(In->getType()); - if (STy) { + // FIXME: remove this when we have first-class aggregates. + if (isa(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 @@ bool LoopRotate::rotateLoop(Loop *Lp, LPPassManager &LPM) { ++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(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); } }