summaryrefslogtreecommitdiffstats
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
commit966dc0a8f94d997d697c8951b88a3b4e60c14e38 (patch)
treee12e03f77111f8ecb9b3168c48fcf626a9b72d6c
parent3dd33b296a6b1d602ad7ffde9774e01077068ffe (diff)
downloadbcm5719-llvm-966dc0a8f94d997d697c8951b88a3b4e60c14e38.tar.gz
bcm5719-llvm-966dc0a8f94d997d697c8951b88a3b4e60c14e38.zip
Added methods to get the live range immediately before a given slot. Intended to parallel the getVNInfoBefore method.
llvm-svn: 148453
-rw-r--r--llvm/include/llvm/CodeGen/LiveInterval.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/include/llvm/CodeGen/LiveInterval.h b/llvm/include/llvm/CodeGen/LiveInterval.h
index dd95c5b9823..885f9bb8a5a 100644
--- a/llvm/include/llvm/CodeGen/LiveInterval.h
+++ b/llvm/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);
OpenPOWER on IntegriCloud