Add API to check and fold memory operands into instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11519 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alkis Evlogimenos
2004-02-17 04:33:18 +00:00
parent 55b5481255
commit b499866c05
3 changed files with 96 additions and 0 deletions

View File

@@ -242,6 +242,16 @@ public:
const TargetRegisterClass *RC) const = 0;
virtual bool canFoldMemoryOperand(MachineInstr* MI, unsigned i) 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