aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/MachineLoopRanges.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/MachineLoopRanges.h')
-rw-r--r--include/llvm/CodeGen/MachineLoopRanges.h12
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;
};