summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveRangeCalc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/LiveRangeCalc.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveRangeCalc.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/llvm/lib/CodeGen/LiveRangeCalc.cpp b/llvm/lib/CodeGen/LiveRangeCalc.cpp
index db91ca113dc..4a0a5107ecf 100644
--- a/llvm/lib/CodeGen/LiveRangeCalc.cpp
+++ b/llvm/lib/CodeGen/LiveRangeCalc.cpp
@@ -120,29 +120,13 @@ void LiveRangeCalc::calculate(LiveInterval &LI, bool TrackSubRegs) {
extendToUses(S, Reg, S.LaneMask);
}
LI.clear();
- constructMainRangeFromSubranges(LI);
+ LI.constructMainRangeFromSubranges(*Indexes, *Alloc);
} else {
resetLiveOutMap();
extendToUses(LI, Reg, ~0u);
}
}
-void LiveRangeCalc::constructMainRangeFromSubranges(LiveInterval &LI) {
- // First create dead defs at all defs found in subranges.
- LiveRange &MainRange = LI;
- assert(MainRange.segments.empty() && MainRange.valnos.empty() &&
- "Expect empty main liverange");
-
- for (const LiveInterval::SubRange &SR : LI.subranges()) {
- for (const VNInfo *VNI : SR.valnos) {
- if (!VNI->isUnused() && !VNI->isPHIDef())
- MainRange.createDeadDef(VNI->def, *Alloc);
- }
- }
-
- resetLiveOutMap();
- extendToUses(MainRange, LI.reg);
-}
void LiveRangeCalc::createDeadDefs(LiveRange &LR, unsigned Reg) {
assert(MRI && Indexes && "call reset() first");
OpenPOWER on IntegriCloud