[PATCH] D21189: Create subranges for new intervals resulting from live interval splitting

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 9 10:32:35 PDT 2016


kparzysz created this revision.
kparzysz added a reviewer: qcolombet.
kparzysz added a subscriber: llvm-commits.
kparzysz set the repository for this revision to rL LLVM.
Herald added subscribers: qcolombet, MatzeB.

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 corresponding 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 subregister 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.


Repository:
  rL LLVM

http://reviews.llvm.org/D21189

Files:
  lib/CodeGen/LiveIntervalAnalysis.cpp
  lib/CodeGen/LiveRangeEdit.cpp
  lib/CodeGen/SplitKit.cpp
  lib/CodeGen/SplitKit.h
  lib/CodeGen/VirtRegMap.cpp
  test/CodeGen/Hexagon/regalloc-bad-undef.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21189.60196.patch
Type: text/x-patch
Size: 24424 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160609/ccf342c2/attachment.bin>


More information about the llvm-commits mailing list