File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -65,12 +65,15 @@ class LiveIntervals {
6565 MachineDominatorTree *DomTree = nullptr ;
6666 std::unique_ptr<LiveIntervalCalc> LICalc;
6767
68- // Allocator for RegUnitRanges and SubRanges.
68+ // Allocator for SubRanges.
6969 BumpPtrAllocator Allocator;
7070
7171 // Allocator for VirtRegIntervals
7272 SpecificBumpPtrAllocator<LiveInterval> LIAllocator;
7373
74+ // Allocator for RegUnitRanges
75+ SpecificBumpPtrAllocator<LiveRange> LRAllocator;
76+
7477 // / Special pool allocator for VNInfo's (LiveInterval val#).
7578 VNInfo::Allocator VNInfoAllocator;
7679
@@ -423,8 +426,8 @@ class LiveIntervals {
423426 if (!LR) {
424427 // Compute missing ranges on demand.
425428 // Use segment set to speed-up initial computation of the live range.
426- RegUnitRanges[Unit] = LR = new (Allocator. Allocate <LiveRange>())
427- LiveRange (UseSegmentSetForPhysRegs);
429+ RegUnitRanges[Unit] = LR =
430+ new (LRAllocator. Allocate ()) LiveRange (UseSegmentSetForPhysRegs);
428431 computeRegUnitRange (*LR, Unit);
429432 }
430433 return *LR;
Original file line number Diff line number Diff line change @@ -146,8 +146,7 @@ void LiveIntervals::clear() {
146146 RegMaskBits.clear ();
147147 RegMaskBlocks.clear ();
148148
149- for (LiveRange *LR : RegUnitRanges)
150- Allocator.Deallocate (LR);
149+ LRAllocator.DestroyAll ();
151150 RegUnitRanges.clear ();
152151
153152 // Free the live intervals themselves.
You can’t perform that action at this time.
0 commit comments