OSDN Git Service

LiveIntervalAnalysis: Rework constructMainRangeFromSubranges()
authorMatthias Braun <matze@braunis.de>
Fri, 20 May 2016 23:14:56 +0000 (23:14 +0000)
committerMatthias Braun <matze@braunis.de>
Fri, 20 May 2016 23:14:56 +0000 (23:14 +0000)
commit6054e84d8282e9e9d4c0d8f182718f29d30e262b
treeb0a1996fc623d6a6ee09f2f1e2508b0c5d24f28f
parentd8eb7dec3eb028bc59d9569db79996a6f8ed696c
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
include/llvm/CodeGen/LiveInterval.h
include/llvm/CodeGen/LiveIntervalAnalysis.h
lib/CodeGen/LiveInterval.cpp
lib/CodeGen/LiveIntervalAnalysis.cpp
lib/CodeGen/LiveRangeCalc.cpp
lib/CodeGen/LiveRangeCalc.h
test/CodeGen/AMDGPU/liveness.mir [new file with mode: 0644]