diff options
author | Matthias Braun <matze@braunis.de> | 2016-05-20 23:14:56 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2016-05-20 23:14:56 +0000 |
commit | 6054e84d8282e9e9d4c0d8f182718f29d30e262b (patch) | |
tree | b0a1996fc623d6a6ee09f2f1e2508b0c5d24f28f /include | |
parent | d8eb7dec3eb028bc59d9569db79996a6f8ed696c (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@270291 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/LiveInterval.h | 4 | ||||
-rw-r--r-- | include/llvm/CodeGen/LiveIntervalAnalysis.h | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h index 1be6ed673f2..7e699f386ed 100644 --- a/include/llvm/CodeGen/LiveInterval.h +++ b/include/llvm/CodeGen/LiveInterval.h @@ -712,10 +712,6 @@ namespace llvm { /// are not considered valid and should only exist temporarily). void removeEmptySubRanges(); - /// Construct main live range by merging the SubRanges of @p LI. - void constructMainRangeFromSubranges(const SlotIndexes &Indexes, - VNInfo::Allocator &VNIAllocator); - /// getSize - Returns the sum of sizes of all the LiveRange's. /// unsigned getSize() const; diff --git a/include/llvm/CodeGen/LiveIntervalAnalysis.h b/include/llvm/CodeGen/LiveIntervalAnalysis.h index 0dac2939059..e1bdd09708b 100644 --- a/include/llvm/CodeGen/LiveIntervalAnalysis.h +++ b/include/llvm/CodeGen/LiveIntervalAnalysis.h @@ -410,6 +410,11 @@ extern cl::opt<bool> UseSegmentSetForPhysRegs; /// on each virtual register. void renameDisconnectedComponents(); + /// For live interval \p LI with correct SubRanges construct matching + /// information for the main live range. Expects the main live range to not + /// have any segments or value numbers. + void constructMainRangeFromSubranges(LiveInterval &LI); + private: /// Compute live intervals for all virtual registers. void computeVirtRegs(); |