From ff2e9b4225ab55ee049b33158a9cce1ef138c2f7 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Fri, 17 Dec 2010 04:09:47 +0000 Subject: Provide LiveIntervalUnion::Query::checkLoopInterference. This is a three-way interval list intersection between a virtual register, a live interval union, and a loop. It will be used to identify interference-free loops for live range splitting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122034 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/LiveIntervalUnion.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/CodeGen/LiveIntervalUnion.h') diff --git a/lib/CodeGen/LiveIntervalUnion.h b/lib/CodeGen/LiveIntervalUnion.h index d8dcbda8d3..ff23cf61a3 100644 --- a/lib/CodeGen/LiveIntervalUnion.h +++ b/lib/CodeGen/LiveIntervalUnion.h @@ -24,6 +24,7 @@ namespace llvm { +class MachineLoopRange; class TargetRegisterInfo; #ifndef NDEBUG @@ -76,6 +77,10 @@ public: bool empty() const { return Segments.empty(); } SlotIndex startIndex() const { return Segments.start(); } + // Provide public access to the underlying map to allow overlap iteration. + typedef LiveSegments Map; + const Map &getMap() { return Segments; } + // Add a live virtual register to this union and merge its segments. void unify(LiveInterval &VirtReg); @@ -223,6 +228,10 @@ public: return InterferingVRegs; } + /// checkLoopInterference - Return true if there is interference overlapping + /// Loop. + bool checkLoopInterference(MachineLoopRange*); + void print(raw_ostream &OS, const TargetRegisterInfo *TRI); private: Query(const Query&); // DO NOT IMPLEMENT -- cgit v1.2.3