From 7792e980c43536814ea42448db9799b4da32fef6 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Sun, 13 Mar 2011 01:23:11 +0000 Subject: 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 --- lib/CodeGen/LiveRangeEdit.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/CodeGen/LiveRangeEdit.cpp') 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 &Dead, LiveIntervals &LIS, const TargetInstrInfo &TII) { -- cgit v1.2.3-70-g09d2