summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2011-09-21 02:20:46 +0000
committerAndrew Trick <atrick@apple.com>2011-09-21 02:20:46 +0000
commit3be654f8082dcbdff011a6716a7c90486e28fc9e (patch)
treec8ed3778b0094ee060135ae967ad30fd478c7635 /include
parente23dc9c0ef50b0a1934c04c1786f3a0478d62f41 (diff)
downloadllvm-3be654f8082dcbdff011a6716a7c90486e28fc9e.tar.gz
llvm-3be654f8082dcbdff011a6716a7c90486e28fc9e.tar.bz2
llvm-3be654f8082dcbdff011a6716a7c90486e28fc9e.tar.xz
Lower ARM adds/subs to add/sub after adding optional CPSR operand.
This is still a hack until we can teach tblgen to generate the optional CPSR operand rather than an implicit CPSR def. But the strangeness is now limited to the selection DAG. ADD/SUB MI's no longer have implicit CPSR defs, nor do we allow flag setting variants of these opcodes in machine code. There are several corner cases to consider, and getting one wrong would previously lead to nasty miscompilation. It's not the first time I've debugged one, so this time I added enough verification to ensure it won't happen again. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140228 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Target/TargetInstrInfo.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h
index 3b21be6d83..e6e963c03e 100644
--- a/include/llvm/Target/TargetInstrInfo.h
+++ b/include/llvm/Target/TargetInstrInfo.h
@@ -49,7 +49,7 @@ public:
: CallFrameSetupOpcode(CFSetupOpcode),
CallFrameDestroyOpcode(CFDestroyOpcode) {
}
-
+
virtual ~TargetInstrInfo();
/// getRegClass - Givem a machine instruction descriptor, returns the register
@@ -671,6 +671,12 @@ public:
bool hasLowDefLatency(const InstrItineraryData *ItinData,
const MachineInstr *DefMI, unsigned DefIdx) const;
+ /// verifyInstruction - Perform target specific instruction verification.
+ virtual
+ bool verifyInstruction(const MachineInstr *MI, StringRef &ErrInfo) const {
+ return true;
+ }
+
private:
int CallFrameSetupOpcode, CallFrameDestroyOpcode;
};