summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-05-02 17:18:31 +0000
committerChris Lattner <sabre@nondot.org>2008-05-02 17:18:31 +0000
commita700b2bd0f22c2e66675e62fc67492485b848d13 (patch)
treed10cf478083ab7c707690f13d8a94800a772be43 /llvm/lib/Transforms
parent86237c37743e21081ffbee0e1dc5074e57ae47dc (diff)
downloadbcm5719-llvm-a700b2bd0f22c2e66675e62fc67492485b848d13.tar.gz
bcm5719-llvm-a700b2bd0f22c2e66675e62fc67492485b848d13.zip
add a FIXME so we remember to eventually remove this code.
llvm-svn: 50582
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopRotation.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopRotation.cpp b/llvm/lib/Transforms/Scalar/LoopRotation.cpp
index 0e31ece4b34..91a96bcedac 100644
--- a/llvm/lib/Transforms/Scalar/LoopRotation.cpp
+++ b/llvm/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<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 @@ 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<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);
}
}
OpenPOWER on IntegriCloud