diff options
author | Matthias Braun <matze@braunis.de> | 2013-10-10 21:28:57 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2013-10-10 21:28:57 +0000 |
commit | e25dde550baec1f79caf2fc06edd74e7ae6ffa33 (patch) | |
tree | 9c324f3382e66b6c1950faa4cd181700ec01f3c9 /lib/CodeGen/LiveIntervalAnalysis.cpp | |
parent | a4aed9ae392b30147745bd27e5fea7b0cebc1702 (diff) | |
download | llvm-e25dde550baec1f79caf2fc06edd74e7ae6ffa33.tar.gz llvm-e25dde550baec1f79caf2fc06edd74e7ae6ffa33.tar.bz2 llvm-e25dde550baec1f79caf2fc06edd74e7ae6ffa33.tar.xz |
Work on LiveRange instead of LiveInterval where possible
Also change some pointer arguments to references at some places where
0-pointers are not allowed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192396 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r-- | lib/CodeGen/LiveIntervalAnalysis.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 4c0e058e61..18abe41174 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -177,9 +177,9 @@ LiveInterval* LiveIntervals::createInterval(unsigned reg) { /// computeVirtRegInterval - Compute the live interval of a virtual register, /// based on defs and uses. -void LiveIntervals::computeVirtRegInterval(LiveInterval *LI) { +void LiveIntervals::computeVirtRegInterval(LiveInterval &LI) { assert(LRCalc && "LRCalc not initialized."); - assert(LI->empty() && "Should only compute empty intervals."); + assert(LI.empty() && "Should only compute empty intervals."); LRCalc->reset(MF, getSlotIndexes(), DomTree, &getVNInfoAllocator()); LRCalc->createDeadDefs(LI); LRCalc->extendToUses(LI); @@ -230,8 +230,8 @@ void LiveIntervals::computeRegMasks() { /// computeRegUnitInterval - Compute the live interval of a register unit, based /// on the uses and defs of aliasing registers. The interval should be empty, /// or contain only dead phi-defs from ABI blocks. -void LiveIntervals::computeRegUnitInterval(LiveInterval *LI) { - unsigned Unit = LI->reg; +void LiveIntervals::computeRegUnitInterval(LiveInterval &LI) { + unsigned Unit = LI.reg; assert(LRCalc && "LRCalc not initialized."); LRCalc->reset(MF, getSlotIndexes(), DomTree, &getVNInfoAllocator()); @@ -305,7 +305,7 @@ void LiveIntervals::computeLiveInRegUnits() { // Compute the 'normal' part of the intervals. for (unsigned i = 0, e = NewIntvs.size(); i != e; ++i) - computeRegUnitInterval(NewIntvs[i]); + computeRegUnitInterval(*NewIntvs[i]); } @@ -440,12 +440,12 @@ bool LiveIntervals::shrinkToUses(LiveInterval *li, return CanSeparate; } -void LiveIntervals::extendToIndices(LiveInterval *LI, +void LiveIntervals::extendToIndices(LiveRange &LR, ArrayRef<SlotIndex> Indices) { assert(LRCalc && "LRCalc not initialized."); LRCalc->reset(MF, getSlotIndexes(), DomTree, &getVNInfoAllocator()); for (unsigned i = 0, e = Indices.size(); i != e; ++i) - LRCalc->extend(LI, Indices[i]); + LRCalc->extend(LR, Indices[i]); } void LiveIntervals::pruneValue(LiveInterval *LI, SlotIndex Kill, |