[llvm-commits] CVS: llvm/lib/Target/X86/X86RegisterInfo.cpp X86RegisterInfo.h

Nate Begeman natebegeman at mac.com
Sat Aug 14 15:05:21 PDT 2004



Changes in directory llvm/lib/Target/X86:

X86RegisterInfo.cpp updated: 1.88 -> 1.89
X86RegisterInfo.h updated: 1.25 -> 1.26
---
Log message:

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

---
Diffs of the changes:  (+3 -4)

Index: llvm/lib/Target/X86/X86RegisterInfo.cpp
diff -u llvm/lib/Target/X86/X86RegisterInfo.cpp:1.88 llvm/lib/Target/X86/X86RegisterInfo.cpp:1.89
--- llvm/lib/Target/X86/X86RegisterInfo.cpp:1.88	Sat Jul 17 15:24:05 2004
+++ llvm/lib/Target/X86/X86RegisterInfo.cpp	Sat Aug 14 17:05:10 2004
@@ -372,10 +372,10 @@
   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!");


Index: llvm/lib/Target/X86/X86RegisterInfo.h
diff -u llvm/lib/Target/X86/X86RegisterInfo.h:1.25 llvm/lib/Target/X86/X86RegisterInfo.h:1.26
--- llvm/lib/Target/X86/X86RegisterInfo.h:1.25	Sun Mar 14 14:14:27 2004
+++ llvm/lib/Target/X86/X86RegisterInfo.h	Sat Aug 14 17:05:10 2004
@@ -57,8 +57,7 @@
                                      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;
 






More information about the llvm-commits mailing list