diff options
author | Hal Finkel <hfinkel@anl.gov> | 2013-03-26 18:56:54 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2013-03-26 18:56:54 +0000 |
commit | 8846129f6eb58982a2cac22306c8c9b586084475 (patch) | |
tree | bd24c433fd6347a3238caebe8f4636ed48b80725 /include | |
parent | b4f60e9f772de7152a0880d84c5ef511f6d2c642 (diff) | |
download | llvm-8846129f6eb58982a2cac22306c8c9b586084475.tar.gz llvm-8846129f6eb58982a2cac22306c8c9b586084475.tar.bz2 llvm-8846129f6eb58982a2cac22306c8c9b586084475.tar.xz |
Update PEI's virtual-register-based scavenging to support multiple simultaneous mappings
The previous algorithm could not deal properly with scavenging multiple virtual
registers because it kept only one live virtual -> physical mapping (and
iterated through operands in order). Now we don't maintain a current mapping,
but rather use replaceRegWith to completely remove the virtual register as
soon as the mapping is established.
In order to allow the register scavenger to return a physical register killed
by an instruction for definition by that same instruction, we now call
RS->forward(I) prior to eliminating virtual registers defined in I. This
requires a minor update to forward to ignore virtual registers.
These new features will be tested in forthcoming commits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178058 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/CodeGen/RegisterScavenging.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/RegisterScavenging.h b/include/llvm/CodeGen/RegisterScavenging.h index babb96b962..0eb2b2ab07 100644 --- a/include/llvm/CodeGen/RegisterScavenging.h +++ b/include/llvm/CodeGen/RegisterScavenging.h @@ -94,8 +94,11 @@ public: } /// skipTo - Move the internal MBB iterator but do not update register states. - /// - void skipTo(MachineBasicBlock::iterator I) { MBBI = I; } + void skipTo(MachineBasicBlock::iterator I) { + if (I == MachineBasicBlock::iterator(NULL)) + Tracking = false; + MBBI = I; + } /// getRegsUsed - return all registers currently in use in used. void getRegsUsed(BitVector &used, bool includeReserved); |