diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-12-17 04:09:47 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-12-17 04:09:47 +0000 |
commit | ff2e9b4225ab55ee049b33158a9cce1ef138c2f7 (patch) | |
tree | 7013c10c1d0330b20f3255dceea1b20212921b6c /include/llvm/CodeGen/MachineLoopRanges.h | |
parent | 5d2477cecf53bef911f57423a5cecb743d4286fa (diff) |
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 'include/llvm/CodeGen/MachineLoopRanges.h')
-rw-r--r-- | include/llvm/CodeGen/MachineLoopRanges.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/MachineLoopRanges.h b/include/llvm/CodeGen/MachineLoopRanges.h index 7e6bec639c..730b729dba 100644 --- a/include/llvm/CodeGen/MachineLoopRanges.h +++ b/include/llvm/CodeGen/MachineLoopRanges.h @@ -29,15 +29,18 @@ class raw_ostream; /// MachineLoopRange - Range information for a single loop. class MachineLoopRange { friend class MachineLoopRanges; - typedef IntervalMap<SlotIndex, unsigned, 4> RangeMap; - typedef RangeMap::Allocator Allocator; +public: + typedef IntervalMap<SlotIndex, unsigned, 4> Map; + typedef Map::Allocator Allocator; + +private: /// The mapped loop. const MachineLoop *const Loop; /// Map intervals to a bit mask. /// Bit 0 = inside loop block. - RangeMap Intervals; + Map Intervals; /// Create a MachineLoopRange, only accessible to MachineLoopRanges. MachineLoopRange(const MachineLoop*, Allocator&, SlotIndexes&); @@ -47,6 +50,9 @@ public: /// inteructions. bool overlaps(SlotIndex Start, SlotIndex Stop); + /// getMap - Allow public read-only access for IntervalMapOverlaps. + const Map &getMap() { return Intervals; } + /// print - Print loop ranges on OS. void print(raw_ostream&) const; }; |