[PATCH] D21916: Add LiveRegUnits class.

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 30 17:52:24 PDT 2016


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

This is a set of register units intended to track register liveness, it
is similar in spirit to LivePhysRegs.
You can also think of this as the liveness tracking parts of the
RegisterScavenger factored out into an own class.

This was proposed in http://llvm.org/PR27609


- Many of the current LivePhysRegs uses can be replaced by this (I will do that in upcoming patches). This patch only switches the internal RegisterScavenger state to show the concept. Using LiveRegUnits should be slightly more efficient than LivePhysRegs.
- It cannot completely LivePhysRegs right now, because some cases like %xmm0 vs. %ymm0 on x86 have the exact same register units but need to be differntiated for ABI reasons. (We may be able to introduce additional register units for this in another patch).
- I decided not to add forward walking support as that only works reliably with kill flags which are intended to be remove long term.
- This patch applies on top of http://reviews.llvm.org/D21885 but it shouldn't be too hard to rebase if 

Repository:
  rL LLVM

http://reviews.llvm.org/D21916

Files:
  include/llvm/CodeGen/LiveRegUnits.h
  include/llvm/CodeGen/RegisterScavenging.h
  lib/CodeGen/CMakeLists.txt
  lib/CodeGen/LiveRegUnits.cpp
  lib/CodeGen/RegisterScavenging.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21916.62452.patch
Type: text/x-patch
Size: 13548 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160701/1bbdf7a5/attachment.bin>


More information about the llvm-commits mailing list