Use getVNInfoBefore() when it makes sense.

llvm-svn: 144517
This commit is contained in:
Jakob Stoklund Olesen
2011-11-14 01:39:36 +00:00
parent 1071cfa4ae
commit d7bcf43dc2
4 changed files with 7 additions and 8 deletions

View File

@@ -810,7 +810,7 @@ void InlineSpiller::markValueUsed(LiveInterval *LI, VNInfo *VNI) {
MachineBasicBlock *MBB = LIS.getMBBFromIndex(VNI->def);
for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(),
PE = MBB->pred_end(); PI != PE; ++PI) {
VNInfo *PVNI = LI->getVNInfoAt(LIS.getMBBEndIdx(*PI).getPrevSlot());
VNInfo *PVNI = LI->getVNInfoBefore(LIS.getMBBEndIdx(*PI));
if (PVNI)
WorkList.push_back(std::make_pair(LI, PVNI));
}