summaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveIntervalUnion.h
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-12-17 04:09:47 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-12-17 04:09:47 +0000
commitff2e9b4225ab55ee049b33158a9cce1ef138c2f7 (patch)
tree7013c10c1d0330b20f3255dceea1b20212921b6c /lib/CodeGen/LiveIntervalUnion.h
parent5d2477cecf53bef911f57423a5cecb743d4286fa (diff)
downloadllvm-ff2e9b4225ab55ee049b33158a9cce1ef138c2f7.tar.gz
llvm-ff2e9b4225ab55ee049b33158a9cce1ef138c2f7.tar.bz2
llvm-ff2e9b4225ab55ee049b33158a9cce1ef138c2f7.tar.xz
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
Diffstat (limited to 'lib/CodeGen/LiveIntervalUnion.h')
-rw-r--r--lib/CodeGen/LiveIntervalUnion.h9
1 files changed, 9 insertions, 0 deletions
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