summaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveInterval.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-11-14 01:39:36 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-11-14 01:39:36 +0000
commit194eb71a11a77c7fb576780783a77e64924dfb10 (patch)
tree957dfb646ac0dc23805ee7c542050c37dbd8eed3 /lib/CodeGen/LiveInterval.cpp
parentb5856c83ff4fd796c3eabccca2ed3b06173aeb51 (diff)
downloadllvm-194eb71a11a77c7fb576780783a77e64924dfb10.tar.gz
llvm-194eb71a11a77c7fb576780783a77e64924dfb10.tar.bz2
llvm-194eb71a11a77c7fb576780783a77e64924dfb10.tar.xz
Use getVNInfoBefore() when it makes sense.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144517 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveInterval.cpp')
-rw-r--r--lib/CodeGen/LiveInterval.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/LiveInterval.cpp b/lib/CodeGen/LiveInterval.cpp
index 42e122efbe..a85639f9c1 100644
--- a/lib/CodeGen/LiveInterval.cpp
+++ b/lib/CodeGen/LiveInterval.cpp
@@ -680,15 +680,14 @@ unsigned ConnectedVNInfoEqClasses::Classify(const LiveInterval *LI) {
// Connect to values live out of predecessors.
for (MachineBasicBlock::const_pred_iterator PI = MBB->pred_begin(),
PE = MBB->pred_end(); PI != PE; ++PI)
- if (const VNInfo *PVNI =
- LI->getVNInfoAt(LIS.getMBBEndIdx(*PI).getPrevSlot()))
+ if (const VNInfo *PVNI = LI->getVNInfoBefore(LIS.getMBBEndIdx(*PI)))
EqClass.join(VNI->id, PVNI->id);
} else {
// Normal value defined by an instruction. Check for two-addr redef.
// FIXME: This could be coincidental. Should we really check for a tied
// operand constraint?
// Note that VNI->def may be a use slot for an early clobber def.
- if (const VNInfo *UVNI = LI->getVNInfoAt(VNI->def.getPrevSlot()))
+ if (const VNInfo *UVNI = LI->getVNInfoBefore(VNI->def))
EqClass.join(VNI->id, UVNI->id);
}
}