diff options
Diffstat (limited to 'include/llvm/CodeGen/LiveInterval.h')
-rw-r--r-- | include/llvm/CodeGen/LiveInterval.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h index 058f95e24e..38d07e4612 100644 --- a/include/llvm/CodeGen/LiveInterval.h +++ b/include/llvm/CodeGen/LiveInterval.h @@ -296,6 +296,12 @@ namespace llvm { return r != end() && r->end.getBaseIndex() == BaseIdx; } + /// Return true if a live range starts at the instruction at this index. + bool isDefinedByInstr(SlotIndex index) const { + const_iterator r = find(index.getDeadSlot()); + return r != end() && r->end.getBaseIndex() == index.getBaseIndex(); + } + /// getLiveRangeContaining - Return the live range that contains the /// specified index, or null if there is none. const LiveRange *getLiveRangeContaining(SlotIndex Idx) const { |