forked from OSchip/llvm-project
Give simple reg allocator a nice Pass Name
llvm-svn: 5058
This commit is contained in:
parent
2979a85984
commit
1499e5a92c
|
@ -80,6 +80,10 @@ namespace {
|
||||||
return runOnMachineFunction(MachineFunction::get(&Fn));
|
return runOnMachineFunction(MachineFunction::get(&Fn));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual const char *getPassName() const {
|
||||||
|
return "Simple Register Allocator";
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// runOnMachineFunction - Register allocate the whole function
|
/// runOnMachineFunction - Register allocate the whole function
|
||||||
bool runOnMachineFunction(MachineFunction &Fn);
|
bool runOnMachineFunction(MachineFunction &Fn);
|
||||||
|
@ -328,7 +332,7 @@ void RegAllocSimple::EliminatePHINodes(MachineBasicBlock &MBB) {
|
||||||
saveVirtRegToStack(opBlock, opI, virtualReg, physReg);
|
saveVirtRegToStack(opBlock, opI, virtualReg, physReg);
|
||||||
} else {
|
} else {
|
||||||
// Allocate a physical register and add a move in the BB
|
// Allocate a physical register and add a move in the BB
|
||||||
unsigned opVirtualReg = (unsigned) opVal.getAllocatedRegNum();
|
unsigned opVirtualReg = opVal.getAllocatedRegNum();
|
||||||
unsigned opPhysReg;
|
unsigned opPhysReg;
|
||||||
opI = moveUseToReg(opBlock, opI, opVirtualReg, physReg);
|
opI = moveUseToReg(opBlock, opI, opVirtualReg, physReg);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue