diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-03-13 01:23:11 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-03-13 01:23:11 +0000 |
commit | 7792e980c43536814ea42448db9799b4da32fef6 (patch) | |
tree | 588136e9c9fab1ac2531f5ce6b1c8ad1fa9738c1 /lib/CodeGen/LiveRangeEdit.cpp | |
parent | b56130f96b6ca98b0c78caf9f12f3936a4d240a8 (diff) | |
download | llvm-7792e980c43536814ea42448db9799b4da32fef6.tar.gz llvm-7792e980c43536814ea42448db9799b4da32fef6.tar.bz2 llvm-7792e980c43536814ea42448db9799b4da32fef6.tar.xz |
Tell the register allocator about new unused virtual registers.
This allows the allocator to free any resources used by the virtual register,
including physical register assignments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127560 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveRangeEdit.cpp')
-rw-r--r-- | lib/CodeGen/LiveRangeEdit.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/LiveRangeEdit.cpp b/lib/CodeGen/LiveRangeEdit.cpp index 75aeac4639..c9985cd9d2 100644 --- a/lib/CodeGen/LiveRangeEdit.cpp +++ b/lib/CodeGen/LiveRangeEdit.cpp @@ -131,6 +131,11 @@ SlotIndex LiveRangeEdit::rematerializeAt(MachineBasicBlock &MBB, return lis.InsertMachineInstrInMaps(--MI).getDefIndex(); } +void LiveRangeEdit::eraseVirtReg(unsigned Reg, LiveIntervals &LIS) { + if (delegate_ && delegate_->LRE_CanEraseVirtReg(Reg)) + LIS.removeInterval(Reg); +} + void LiveRangeEdit::eliminateDeadDefs(SmallVectorImpl<MachineInstr*> &Dead, LiveIntervals &LIS, const TargetInstrInfo &TII) { |