Eliminate MachineFunction& argument from eliminateFrameIndex in x86 Target. Get MachineFunction from MachineInstruction's parent's parent

llvm-svn: 15739
This commit is contained in:
Nate Begeman 2004-08-14 22:05:10 +00:00
parent 1b0142d54e
commit a4da0d6294
2 changed files with 3 additions and 4 deletions

View File

@ -372,10 +372,10 @@ eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,
MBB.erase(I);
}
void X86RegisterInfo::eliminateFrameIndex(MachineFunction &MF,
MachineBasicBlock::iterator II) const {
void X86RegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II) const{
unsigned i = 0;
MachineInstr &MI = *II;
MachineFunction &MF = *MI.getParent()->getParent();
while (!MI.getOperand(i).isFrameIndex()) {
++i;
assert(i < MI.getNumOperands() && "Instr doesn't have FrameIndex operand!");

View File

@ -57,8 +57,7 @@ struct X86RegisterInfo : public X86GenRegisterInfo {
MachineBasicBlock &MBB,
MachineBasicBlock::iterator MI) const;
void eliminateFrameIndex(MachineFunction &MF,
MachineBasicBlock::iterator MI) const;
void eliminateFrameIndex(MachineBasicBlock::iterator MI) const;
void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;