summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMBaseInstrInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/ARM/ARMBaseInstrInfo.h')
-rw-r--r--llvm/lib/Target/ARM/ARMBaseInstrInfo.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.h b/llvm/lib/Target/ARM/ARMBaseInstrInfo.h
index 20fae2e54ee..4f1c4539243 100644
--- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.h
+++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.h
@@ -336,6 +336,17 @@ public:
unsigned NumInstrs) const {
return NumInstrs && NumInstrs == 1;
}
+
+ /// isCompareInstr - If the machine instruction is a comparison instruction,
+ /// then return true. Also return the source register in SrcReg and the value
+ /// it compares against in CmpValue.
+ virtual bool isCompareInstr(const MachineInstr *MI, unsigned &SrcReg,
+ int &CmpValue) const;
+
+ /// convertToSetZeroFlag - Convert the instruction to set the zero flag so
+ /// that we can remove a "comparison with zero".
+ virtual bool convertToSetZeroFlag(MachineInstr *Instr,
+ MachineInstr *CmpInstr) const;
};
static inline
OpenPOWER on IntegriCloud