diff options
author | Nate Begeman <natebegeman@mac.com> | 2004-08-14 22:05:10 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2004-08-14 22:05:10 +0000 |
commit | f8be5e94aaf70d53dc043f5e541fc0bf6771db22 (patch) | |
tree | b577b39a30dc2a520ca85002dc98ce683d3106d1 /lib/Target/X86 | |
parent | 1fa715a3999db81a9092ec79606c58d2a0edf36c (diff) | |
download | external_llvm-f8be5e94aaf70d53dc043f5e541fc0bf6771db22.zip external_llvm-f8be5e94aaf70d53dc043f5e541fc0bf6771db22.tar.gz external_llvm-f8be5e94aaf70d53dc043f5e541fc0bf6771db22.tar.bz2 |
Eliminate MachineFunction& argument from eliminateFrameIndex in x86 Target. Get MachineFunction from MachineInstruction's parent's parent
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15739 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86')
-rw-r--r-- | lib/Target/X86/X86RegisterInfo.cpp | 4 | ||||
-rw-r--r-- | lib/Target/X86/X86RegisterInfo.h | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp index 8c0d08e..dba98d6 100644 --- a/lib/Target/X86/X86RegisterInfo.cpp +++ b/lib/Target/X86/X86RegisterInfo.cpp @@ -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!"); diff --git a/lib/Target/X86/X86RegisterInfo.h b/lib/Target/X86/X86RegisterInfo.h index b67091c..a582519 100644 --- a/lib/Target/X86/X86RegisterInfo.h +++ b/lib/Target/X86/X86RegisterInfo.h @@ -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; |