forked from OSchip/llvm-project
Revert r168630, r168631, and r168633 as these are causing nightly test failures.
llvm-svn: 168751
This commit is contained in:
parent
93a39dfdf3
commit
ed119d542b
|
@ -305,8 +305,6 @@ void MachineRegisterInfo::dumpUses(unsigned Reg) const {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void MachineRegisterInfo::freezeReservedRegs(const MachineFunction &MF) {
|
void MachineRegisterInfo::freezeReservedRegs(const MachineFunction &MF) {
|
||||||
assert (!reservedRegsFrozen() &&
|
|
||||||
"freezeReservedRegs should only be called once!");
|
|
||||||
ReservedRegs = TRI->getReservedRegs(MF);
|
ReservedRegs = TRI->getReservedRegs(MF);
|
||||||
assert(ReservedRegs.size() == TRI->getNumRegs() &&
|
assert(ReservedRegs.size() == TRI->getNumRegs() &&
|
||||||
"Invalid ReservedRegs vector from target");
|
"Invalid ReservedRegs vector from target");
|
||||||
|
|
|
@ -58,6 +58,7 @@ void RegAllocBase::init(VirtRegMap &vrm,
|
||||||
VRM = &vrm;
|
VRM = &vrm;
|
||||||
LIS = &lis;
|
LIS = &lis;
|
||||||
Matrix = &mat;
|
Matrix = &mat;
|
||||||
|
MRI->freezeReservedRegs(vrm.getMachineFunction());
|
||||||
RegClassInfo.runOnMachineFunction(vrm.getMachineFunction());
|
RegClassInfo.runOnMachineFunction(vrm.getMachineFunction());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1127,6 +1127,7 @@ bool RAFast::runOnMachineFunction(MachineFunction &Fn) {
|
||||||
TM = &Fn.getTarget();
|
TM = &Fn.getTarget();
|
||||||
TRI = TM->getRegisterInfo();
|
TRI = TM->getRegisterInfo();
|
||||||
TII = TM->getInstrInfo();
|
TII = TM->getInstrInfo();
|
||||||
|
MRI->freezeReservedRegs(Fn);
|
||||||
RegClassInfo.runOnMachineFunction(Fn);
|
RegClassInfo.runOnMachineFunction(Fn);
|
||||||
UsedInInstr.clear();
|
UsedInInstr.clear();
|
||||||
UsedInInstr.setUniverse(TRI->getNumRegs());
|
UsedInInstr.setUniverse(TRI->getNumRegs());
|
||||||
|
|
|
@ -552,6 +552,8 @@ bool RegAllocPBQP::runOnMachineFunction(MachineFunction &MF) {
|
||||||
vrm = &getAnalysis<VirtRegMap>();
|
vrm = &getAnalysis<VirtRegMap>();
|
||||||
spiller.reset(createInlineSpiller(*this, MF, *vrm));
|
spiller.reset(createInlineSpiller(*this, MF, *vrm));
|
||||||
|
|
||||||
|
mri->freezeReservedRegs(MF);
|
||||||
|
|
||||||
DEBUG(dbgs() << "PBQP Register Allocating for " << mf->getName() << "\n");
|
DEBUG(dbgs() << "PBQP Register Allocating for " << mf->getName() << "\n");
|
||||||
|
|
||||||
// Allocator main loop:
|
// Allocator main loop:
|
||||||
|
|
Loading…
Reference in New Issue