aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-05-20 23:14:56 +0000
committerMatthias Braun <matze@braunis.de>2016-05-20 23:14:56 +0000
commit71f9564e7fd2ae6a0b7b8a7258591b218f51b24b (patch)
tree005013bd54a18a6e1a35d5a344f890ee8db31cce /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
parente29b7689bd181f35a515dac093858b56bf2a8b47 (diff)
downloadllvm-71f9564e7fd2ae6a0b7b8a7258591b218f51b24b.zip
llvm-71f9564e7fd2ae6a0b7b8a7258591b218f51b24b.tar.gz
llvm-71f9564e7fd2ae6a0b7b8a7258591b218f51b24b.tar.bz2
LiveIntervalAnalysis: Rework constructMainRangeFromSubranges()
We now use LiveRangeCalc::extendToUses() instead of a specially designed algorithm in constructMainRangeFromSubranges(): - The original motivation for constructMainRangeFromSubranges() were differences between the main liverange and subranges because of hidden dead definitions. This case however cannot happen anymore with the DetectDeadLaneMasks pass in place. - It simplifies the code. - This fixes a longstanding bug where we did not properly create new SSA values on merging control flow (the MachineVerifier missed most of these cases). - Move constructMainRangeFromSubranges() to LiveIntervalAnalysis and LiveRangeCalc to better match the implementation/available helper functions. This re-applies r269016. The fixes from r270290 and r270259 should avoid the machine verifier problems this time. llvm-svn: 270291
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index 2a7989d..a0e6e20 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -1585,3 +1585,9 @@ void LiveIntervals::renameDisconnectedComponents() {
SubRegClasses.renameComponents(*LI);
}
}
+
+void LiveIntervals::constructMainRangeFromSubranges(LiveInterval &LI) {
+ assert(LRCalc && "LRCalc not initialized.");
+ LRCalc->reset(MF, getSlotIndexes(), DomTree, &getVNInfoAllocator());
+ LRCalc->constructMainRangeFromSubranges(LI);
+}