aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Scalar/LoopRotation.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-06-20 14:18:48 +0000
committerJay Foad <jay.foad@gmail.com>2011-06-20 14:18:48 +0000
commit372ad64b4db770404805a5ca88ab9d78bea3c386 (patch)
treec2e5ffa958e080d5f5542dde76d47c728cab2ec5 /llvm/lib/Transforms/Scalar/LoopRotation.cpp
parent5c54d75763d0a21d2b8e45ce1cd9b3f201164112 (diff)
downloadllvm-372ad64b4db770404805a5ca88ab9d78bea3c386.zip
llvm-372ad64b4db770404805a5ca88ab9d78bea3c386.tar.gz
llvm-372ad64b4db770404805a5ca88ab9d78bea3c386.tar.bz2
Make better use of the PHINode API.
Change various bits of code to make better use of the existing PHINode API, to insulate them from forthcoming changes in how PHINodes store their operands. llvm-svn: 133434
Diffstat (limited to 'llvm/lib/Transforms/Scalar/LoopRotation.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopRotation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopRotation.cpp b/llvm/lib/Transforms/Scalar/LoopRotation.cpp
index 47dced3..9fd0958 100644
--- a/llvm/lib/Transforms/Scalar/LoopRotation.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopRotation.cpp
@@ -220,7 +220,7 @@ bool LoopRotate::rotateLoop(Loop *L) {
// For PHI nodes, the value available in OldPreHeader is just the
// incoming value from OldPreHeader.
for (; PHINode *PN = dyn_cast<PHINode>(I); ++I)
- ValueMap[PN] = PN->getIncomingValue(PN->getBasicBlockIndex(OrigPreheader));
+ ValueMap[PN] = PN->getIncomingValueForBlock(OrigPreheader);
// For the rest of the instructions, either hoist to the OrigPreheader if
// possible or create a clone in the OldPreHeader if not.