OSDN Git Service

Create subranges for new intervals resulting from live interval splitting
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>
Wed, 24 Aug 2016 13:37:55 +0000 (13:37 +0000)
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>
Wed, 24 Aug 2016 13:37:55 +0000 (13:37 +0000)
commit31a5f885bf5b8ed3107850a448660057705fd357
tree59753893b7b15e5fd9aea7c94abb903b303545fc
parent39b3d8a9d4a288ce9e8233b892ca9f31afdfbe42
Create subranges for new intervals resulting from live interval splitting

The register allocator can split a live interval of a register into a set
of smaller intervals. After the allocation of registers is complete, the
rewriter will modify the IR to replace virtual registers with the corres-
ponding physical registers. At this stage, if a register corresponding
to a subregister of a virtual register is used, the rewriter will check
if that subregister is undefined, and if so, it will add the <undef> flag
to the machine operand. The function verifying liveness of the subregis-
ter would assume that it is undefined, unless any of the subranges of the
live interval proves otherwise.
The problem is that the live intervals created during splitting do not
have any subranges, even if the original parent interval did. This could
result in the <undef> flag placed on a register that is actually defined.

Differential Revision: http://reviews.llvm.org/D21189

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279625 91177308-0d34-0410-b5e6-96231b3b80d8
17 files changed:
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
lib/CodeGen/LiveRangeEdit.cpp
lib/CodeGen/MachineVerifier.cpp
lib/CodeGen/RegAllocBase.cpp
lib/CodeGen/RegisterCoalescer.cpp
lib/CodeGen/RenameIndependentSubregs.cpp
lib/CodeGen/SplitKit.cpp
lib/CodeGen/SplitKit.h
lib/CodeGen/VirtRegMap.cpp
lib/Target/Hexagon/HexagonExpandCondsets.cpp
test/CodeGen/AMDGPU/subreg-intervals.mir [new file with mode: 0644]
test/CodeGen/Hexagon/regalloc-bad-undef.mir [new file with mode: 0644]