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 | 372ad64b4db770404805a5ca88ab9d78bea3c386 (patch) | |
| tree | c2e5ffa958e080d5f5542dde76d47c728cab2ec5 /llvm/lib/Transforms/Scalar/LoopRotation.cpp | |
| parent | 5c54d75763d0a21d2b8e45ce1cd9b3f201164112 (diff) | |
| download | llvm-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.cpp | 2 |
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. |
