summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/LiveInterval.h
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2012-01-19 01:36:06 +0000
committerLang Hames <lhames@gmail.com>2012-01-19 01:36:06 +0000
commitc2220057c0c464613a0b0fec36c0a582c7c94e2d (patch)
tree835025cfb372cf7ce8ff39720a3f5f7934bb5b41 /include/llvm/CodeGen/LiveInterval.h
parent2faa5d2328bd513ec6e94a741f494470810baf42 (diff)
downloadllvm-c2220057c0c464613a0b0fec36c0a582c7c94e2d.tar.gz
llvm-c2220057c0c464613a0b0fec36c0a582c7c94e2d.tar.bz2
llvm-c2220057c0c464613a0b0fec36c0a582c7c94e2d.tar.xz
Added methods to get the live range immediately before a given slot. Intended to parallel the getVNInfoBefore method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148453 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/LiveInterval.h')
-rw-r--r--include/llvm/CodeGen/LiveInterval.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h
index dd95c5b982..885f9bb8a5 100644
--- a/include/llvm/CodeGen/LiveInterval.h
+++ b/include/llvm/CodeGen/LiveInterval.h
@@ -405,6 +405,14 @@ namespace llvm {
return I == end() ? 0 : &*I;
}
+ const LiveRange *getLiveRangeBefore(SlotIndex Idx) const {
+ return getLiveRangeContaining(Idx.getPrevSlot());
+ }
+
+ LiveRange *getLiveRangeBefore(SlotIndex Idx) {
+ return getLiveRangeContaining(Idx.getPrevSlot());
+ }
+
/// getVNInfoAt - Return the VNInfo that is live at Idx, or NULL.
VNInfo *getVNInfoAt(SlotIndex Idx) const {
const_iterator I = FindLiveRangeContaining(Idx);