diff options
author | Jay Foad <jay.foad@gmail.com> | 2011-06-20 14:18:48 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2011-06-20 14:18:48 +0000 |
commit | c137120bb047a7017cbab21f5f9c9e6f65e2b84f (patch) | |
tree | 146a56f5331f05c10548bd0ca1f7bc0726f3ed8f /lib/Transforms/Scalar/LoopRotation.cpp | |
parent | 691c05bb29d3e2ec9c2ed6b1c082ce5d484b75da (diff) | |
download | llvm-c137120bb047a7017cbab21f5f9c9e6f65e2b84f.tar.gz llvm-c137120bb047a7017cbab21f5f9c9e6f65e2b84f.tar.bz2 llvm-c137120bb047a7017cbab21f5f9c9e6f65e2b84f.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133434 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/LoopRotation.cpp')
-rw-r--r-- | lib/Transforms/Scalar/LoopRotation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/LoopRotation.cpp b/lib/Transforms/Scalar/LoopRotation.cpp index 47dced37c3..9fd0958fd4 100644 --- a/lib/Transforms/Scalar/LoopRotation.cpp +++ b/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. |