diff options
author | Chris Lattner <sabre@nondot.org> | 2004-02-17 05:54:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-02-17 05:54:26 +0000 |
commit | 8026a6982e72f51cc231489fecfe19fbb973eb87 (patch) | |
tree | 67961aafda30b5b60611512056a8b3169eb4e559 | |
parent | 0f9c491abc098f9dc10050f82134c1beb9903413 (diff) |
Simplify and document the new interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11524 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Target/MRegisterInfo.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/include/llvm/Target/MRegisterInfo.h b/include/llvm/Target/MRegisterInfo.h index 5bd24e181a..7df0c9ff30 100644 --- a/include/llvm/Target/MRegisterInfo.h +++ b/include/llvm/Target/MRegisterInfo.h @@ -242,16 +242,17 @@ public: const TargetRegisterClass *RC) const = 0; - virtual bool canFoldMemoryOperand(MachineInstr* MI, unsigned i) const { + /// foldMemoryOperand - If this target supports it, fold a load or store of + /// the specified stack slot into the specified machine instruction for the + /// specified operand. If this is possible, the target should perform the + /// 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 bool foldMemoryOperand(MachineBasicBlock::iterator &MI, + unsigned OpNum, int FrameIndex) const { return false; } - virtual int foldMemoryOperand(MachineInstr* MI, - unsigned i, - int FrameIndex) const { - return 0; - } - /// getCallFrameSetup/DestroyOpcode - These methods return the opcode of the /// frame setup/destroy instructions if they exist (-1 otherwise). Some /// targets use pseudo instructions in order to abstract away the difference |