diff options
| author | Lang Hames <lhames@gmail.com> | 2009-12-22 00:11:50 +0000 |
|---|---|---|
| committer | Lang Hames <lhames@gmail.com> | 2009-12-22 00:11:50 +0000 |
| commit | 4c052261de0a8d4084361bdce6241f0dac3e86fa (patch) | |
| tree | 6241191c9db2f47df536a4b4c5f4d3b4bb12a0ed /llvm/lib/CodeGen/Spiller.cpp | |
| parent | 2bb0765bb4b56babcaa4bd353b7aa79e59211d6a (diff) | |
| download | bcm5719-llvm-4c052261de0a8d4084361bdce6241f0dac3e86fa.tar.gz bcm5719-llvm-4c052261de0a8d4084361bdce6241f0dac3e86fa.zip | |
Changed slot index ranges for MachineBasicBlocks to be exclusive of endpoint.
This fixes an in-place update bug where code inserted at the end of basic blocks may not be covered by existing intervals which were live across the entire block. It is also consistent with the way ranges are specified for live intervals.
llvm-svn: 91859
Diffstat (limited to 'llvm/lib/CodeGen/Spiller.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/Spiller.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/Spiller.cpp b/llvm/lib/CodeGen/Spiller.cpp index bc246c14b77..bec92949ccd 100644 --- a/llvm/lib/CodeGen/Spiller.cpp +++ b/llvm/lib/CodeGen/Spiller.cpp @@ -486,10 +486,10 @@ private: SlotIndex newKillRangeEnd = oldKillRange->end; oldKillRange->end = copyIdx.getDefIndex(); - if (newKillRangeEnd != lis->getMBBEndIdx(killMBB).getNextSlot()) { - assert(newKillRangeEnd > lis->getMBBEndIdx(killMBB).getNextSlot() && + if (newKillRangeEnd != lis->getMBBEndIdx(killMBB)) { + assert(newKillRangeEnd > lis->getMBBEndIdx(killMBB) && "PHI kill range doesn't reach kill-block end. Not sane."); - newLI->addRange(LiveRange(lis->getMBBEndIdx(killMBB).getNextSlot(), + newLI->addRange(LiveRange(lis->getMBBEndIdx(killMBB), newKillRangeEnd, newVNI)); } @@ -500,7 +500,7 @@ private: newKillVNI->addKill(lis->getMBBTerminatorGap(killMBB)); newKillVNI->setHasPHIKill(true); li->addRange(LiveRange(copyIdx.getDefIndex(), - lis->getMBBEndIdx(killMBB).getNextSlot(), + lis->getMBBEndIdx(killMBB), newKillVNI)); } |

