diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-11-13 00:39:45 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-11-13 00:39:45 +0000 |
commit | 929e4da68ba95f0616172d326b8547f888f5eb37 (patch) | |
tree | 40afc416492b39d3a1fb24f62193751299899bba /lib/CodeGen/VirtRegMap.h | |
parent | 334575e79b93500547e73519f5a68c7d99d1efaf (diff) | |
download | external_llvm-929e4da68ba95f0616172d326b8547f888f5eb37.zip external_llvm-929e4da68ba95f0616172d326b8547f888f5eb37.tar.gz external_llvm-929e4da68ba95f0616172d326b8547f888f5eb37.tar.bz2 |
Stop tracking unused registers in VirtRegMap.
The information was only used by the register allocator in
StackSlotColoring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144482 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/VirtRegMap.h')
-rw-r--r-- | lib/CodeGen/VirtRegMap.h | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/lib/CodeGen/VirtRegMap.h b/lib/CodeGen/VirtRegMap.h index 03abff3..3ce4a34 100644 --- a/lib/CodeGen/VirtRegMap.h +++ b/lib/CodeGen/VirtRegMap.h @@ -132,9 +132,6 @@ namespace llvm { /// the register is implicitly defined. BitVector ImplicitDefed; - /// UnusedRegs - A list of physical registers that have not been used. - BitVector UnusedRegs; - /// createSpillSlot - Allocate a spill slot for RC from MFI. unsigned createSpillSlot(const TargetRegisterClass *RC); @@ -475,39 +472,6 @@ namespace llvm { /// the folded instruction map and spill point map. void RemoveMachineInstrFromMaps(MachineInstr *MI); - /// FindUnusedRegisters - Gather a list of allocatable registers that - /// have not been allocated to any virtual register. - bool FindUnusedRegisters(LiveIntervals* LIs); - - /// HasUnusedRegisters - Return true if there are any allocatable registers - /// that have not been allocated to any virtual register. - bool HasUnusedRegisters() const { - return !UnusedRegs.none(); - } - - /// setRegisterUsed - Remember the physical register is now used. - void setRegisterUsed(unsigned Reg) { - UnusedRegs.reset(Reg); - } - - /// isRegisterUnused - Return true if the physical register has not been - /// used. - bool isRegisterUnused(unsigned Reg) const { - return UnusedRegs[Reg]; - } - - /// getFirstUnusedRegister - Return the first physical register that has not - /// been used. - unsigned getFirstUnusedRegister(const TargetRegisterClass *RC) { - int Reg = UnusedRegs.find_first(); - while (Reg != -1) { - if (allocatableRCRegs[RC][Reg]) - return (unsigned)Reg; - Reg = UnusedRegs.find_next(Reg); - } - return 0; - } - /// rewrite - Rewrite all instructions in MF to use only physical registers /// by mapping all virtual register operands to their assigned physical /// registers. |