mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Match MachineFunction::UsedPhysRegs changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36452 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -41,7 +41,6 @@ namespace {
|
||||
MachineFunction *MF;
|
||||
const TargetMachine *TM;
|
||||
const MRegisterInfo *RegInfo;
|
||||
bool *PhysRegsEverUsed;
|
||||
|
||||
// StackSlotForVirtReg - Maps SSA Regs => frame index on the stack where
|
||||
// these values are spilled
|
||||
@@ -126,7 +125,7 @@ unsigned RegAllocSimple::getFreeReg(unsigned virtualReg) {
|
||||
unsigned PhysReg = *(RI+regIdx);
|
||||
|
||||
if (!RegsUsed[PhysReg]) {
|
||||
PhysRegsEverUsed[PhysReg] = true;
|
||||
MF->setPhysRegUsed(PhysReg);
|
||||
return PhysReg;
|
||||
}
|
||||
}
|
||||
@@ -178,7 +177,7 @@ void RegAllocSimple::AllocateBasicBlock(MachineBasicBlock &MBB) {
|
||||
if (Desc.ImplicitDefs) {
|
||||
for (Regs = Desc.ImplicitDefs; *Regs; ++Regs) {
|
||||
RegsUsed[*Regs] = true;
|
||||
PhysRegsEverUsed[*Regs] = true;
|
||||
MF->setPhysRegUsed(*Regs);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -236,10 +235,6 @@ bool RegAllocSimple::runOnMachineFunction(MachineFunction &Fn) {
|
||||
TM = &MF->getTarget();
|
||||
RegInfo = TM->getRegisterInfo();
|
||||
|
||||
PhysRegsEverUsed = new bool[RegInfo->getNumRegs()];
|
||||
std::fill(PhysRegsEverUsed, PhysRegsEverUsed+RegInfo->getNumRegs(), false);
|
||||
Fn.setUsedPhysRegs(PhysRegsEverUsed);
|
||||
|
||||
// Loop over all of the basic blocks, eliminating virtual register references
|
||||
for (MachineFunction::iterator MBB = Fn.begin(), MBBe = Fn.end();
|
||||
MBB != MBBe; ++MBB)
|
||||
|
Reference in New Issue
Block a user