summaryrefslogtreecommitdiff
path: root/include/llvm/Target
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-07-05 14:38:48 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-07-05 14:38:48 +0000
commit71804149a3a6f6c081b874869b27fafe7d3288ce (patch)
treecf54aa2d5ab919f29dcba6c1bb132adcd30106bf /include/llvm/Target
parente684b96e3c6513f88137afee7c344a4d2d9f0694 (diff)
downloadllvm-71804149a3a6f6c081b874869b27fafe7d3288ce.tar.gz
llvm-71804149a3a6f6c081b874869b27fafe7d3288ce.tar.bz2
llvm-71804149a3a6f6c081b874869b27fafe7d3288ce.tar.xz
[SystemZ] Remove no-op MVCs
The stack coloring pass has code to delete stores and loads that become trivially dead after coloring. Extend it to cope with single instructions that copy from one frame index to another. The testcase happens to show an example of this kicking in at the moment. It did occur in Real Code too though. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185705 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target')
-rw-r--r--include/llvm/Target/TargetInstrInfo.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h
index 7172eb0b68..f746daf921 100644
--- a/include/llvm/Target/TargetInstrInfo.h
+++ b/include/llvm/Target/TargetInstrInfo.h
@@ -173,6 +173,14 @@ public:
const MachineMemOperand *&MMO,
int &FrameIndex) const;
+ /// isStackSlotCopy - Return true if the specified machine instruction
+ /// is a copy of one stack slot to another and has no other effect.
+ /// Provide the identity of the two frame indices.
+ virtual bool isStackSlotCopy(const MachineInstr *MI, int &DestFrameIndex,
+ int &SrcFrameIndex) const {
+ return false;
+ }
+
/// reMaterialize - Re-issue the specified 'original' instruction at the
/// specific location targeting a new destination register.
/// The register in Orig->getOperand(0).getReg() will be substituted by