[llvm-commits] [llvm] r52649 - /llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
Owen Anderson
resistor at mac.com
Mon Jun 23 15:12:24 PDT 2008
Author: resistor
Date: Mon Jun 23 17:12:23 2008
New Revision: 52649
URL: http://llvm.org/viewvc/llvm-project?rev=52649&view=rev
Log:
Use getMBBEndIdx rather than assuming that the end is right after the last instruction in the block.
Modified:
llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp?rev=52649&r1=52648&r2=52649&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp (original)
+++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.cpp Mon Jun 23 17:12:23 2008
@@ -443,7 +443,7 @@
LI.FindLiveRangeContaining(li_->getDefIndex(DefIdx));
if (DstLR == LI.end())
return false;
- unsigned KillIdx = li_->getInstructionIndex(&MBB->back()) + InstrSlots::NUM;
+ unsigned KillIdx = li_->getMBBEndIdx(MBB) + 1;
if (DstLR->valno->kills.size() == 1 &&
DstLR->valno->kills[0] == KillIdx && DstLR->valno->hasPHIKill)
return true;
More information about the llvm-commits
mailing list