diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2011-06-12 15:42:51 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2011-06-12 15:42:51 +0000 |
commit | 56fe8f14099930935e3870e3e823c322a85c1c89 (patch) | |
tree | b3032e51d630e8070e9e08d6641648f195316a80 /lib/CodeGen/LiveRangeEdit.h | |
parent | 6b943ff3a3f8617113ecbf611cf0f8957e4e19d2 (diff) |
Diffstat (limited to 'lib/CodeGen/LiveRangeEdit.h')
-rw-r--r-- | lib/CodeGen/LiveRangeEdit.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/CodeGen/LiveRangeEdit.h b/lib/CodeGen/LiveRangeEdit.h index 14d227e61957..db6740c1fbcd 100644 --- a/lib/CodeGen/LiveRangeEdit.h +++ b/lib/CodeGen/LiveRangeEdit.h @@ -18,8 +18,9 @@ #ifndef LLVM_CODEGEN_LIVERANGEEDIT_H #define LLVM_CODEGEN_LIVERANGEEDIT_H -#include "llvm/CodeGen/LiveInterval.h" +#include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/SmallPtrSet.h" +#include "llvm/CodeGen/LiveInterval.h" namespace llvm { @@ -113,6 +114,10 @@ public: bool empty() const { return size() == 0; } LiveInterval *get(unsigned idx) const { return newRegs_[idx+firstNew_]; } + ArrayRef<LiveInterval*> regs() const { + return ArrayRef<LiveInterval*>(newRegs_).slice(firstNew_); + } + /// FIXME: Temporary accessors until we can get rid of /// LiveIntervals::AddIntervalsForSpills SmallVectorImpl<LiveInterval*> *getNewVRegs() { return &newRegs_; } |