From a1a7148c4de22a2cedc76b97ef80569b36698342 Mon Sep 17 00:00:00 2001 From: Alkis Evlogimenos Date: Sun, 14 Mar 2004 20:14:27 +0000 Subject: [PATCH] Another API change to MRegisterInfo::foldMemoryOperand. Instead of a MachineBasicBlock::iterator take a MachineInstr*. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12392 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/MRegisterInfo.h | 2 +- lib/Target/X86/X86RegisterInfo.cpp | 7 +++---- lib/Target/X86/X86RegisterInfo.h | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/llvm/Target/MRegisterInfo.h b/include/llvm/Target/MRegisterInfo.h index b8fc17d23ed..e54a354f138 100644 --- a/include/llvm/Target/MRegisterInfo.h +++ b/include/llvm/Target/MRegisterInfo.h @@ -259,7 +259,7 @@ public: /// is returned with the specified operand folded, otherwise NULL is /// returned. The client is responsible for removing the old /// instruction and adding the new one in the instruction stream - virtual MachineInstr* foldMemoryOperand(MachineBasicBlock::iterator MI, + virtual MachineInstr* foldMemoryOperand(MachineInstr* MI, unsigned OpNum, int FrameIndex) const { return NULL; diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp index 211cd6e6c8d..b904c344b20 100644 --- a/lib/Target/X86/X86RegisterInfo.cpp +++ b/lib/Target/X86/X86RegisterInfo.cpp @@ -132,10 +132,9 @@ static MachineInstr *MakeRMIInst(unsigned Opcode, unsigned FrameIndex, } -MachineInstr* X86RegisterInfo::foldMemoryOperand( - MachineBasicBlock::iterator MI, - unsigned i, - int FrameIndex) const { +MachineInstr* X86RegisterInfo::foldMemoryOperand(MachineInstr* MI, + unsigned i, + int FrameIndex) const { if (NoFusing) return NULL; /// FIXME: This should obviously be autogenerated by tablegen when patterns diff --git a/lib/Target/X86/X86RegisterInfo.h b/lib/Target/X86/X86RegisterInfo.h index 3fd6ebec509..b67091cd404 100644 --- a/lib/Target/X86/X86RegisterInfo.h +++ b/lib/Target/X86/X86RegisterInfo.h @@ -48,7 +48,7 @@ struct X86RegisterInfo : public X86GenRegisterInfo { /// folding and return true, otherwise it should return false. If it folds /// the instruction, it is likely that the MachineInstruction the iterator /// references has been changed. - virtual MachineInstr* foldMemoryOperand(MachineBasicBlock::iterator MI, + virtual MachineInstr* foldMemoryOperand(MachineInstr* MI, unsigned OpNum, int FrameIndex) const;