mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
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
This commit is contained in:
@ -49,11 +49,8 @@ namespace {
|
||||
class StackSlotColoring : public MachineFunctionPass {
|
||||
bool ColorWithRegs;
|
||||
LiveStacks* LS;
|
||||
VirtRegMap* VRM;
|
||||
MachineFrameInfo *MFI;
|
||||
MachineRegisterInfo *MRI;
|
||||
const TargetInstrInfo *TII;
|
||||
const TargetRegisterInfo *TRI;
|
||||
const MachineLoopInfo *loopInfo;
|
||||
|
||||
// SSIntervals - Spill slot intervals.
|
||||
@ -414,21 +411,16 @@ bool StackSlotColoring::runOnMachineFunction(MachineFunction &MF) {
|
||||
});
|
||||
|
||||
MFI = MF.getFrameInfo();
|
||||
MRI = &MF.getRegInfo();
|
||||
TII = MF.getTarget().getInstrInfo();
|
||||
TRI = MF.getTarget().getRegisterInfo();
|
||||
LS = &getAnalysis<LiveStacks>();
|
||||
VRM = &getAnalysis<VirtRegMap>();
|
||||
loopInfo = &getAnalysis<MachineLoopInfo>();
|
||||
|
||||
bool Changed = false;
|
||||
|
||||
unsigned NumSlots = LS->getNumIntervals();
|
||||
if (NumSlots < 2) {
|
||||
if (NumSlots == 0 || !VRM->HasUnusedRegisters())
|
||||
// Nothing to do!
|
||||
return false;
|
||||
}
|
||||
if (NumSlots == 0)
|
||||
// Nothing to do!
|
||||
return false;
|
||||
|
||||
// If there are calls to setjmp or sigsetjmp, don't perform stack slot
|
||||
// coloring. The stack could be modified before the longjmp is executed,
|
||||
|
Reference in New Issue
Block a user