diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp | 13 | ||||
-rw-r--r-- | llvm/lib/Target/ARM/ARMBaseInstrInfo.h | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp index 28ad3184556..e42f4007f34 100644 --- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp +++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp @@ -4696,6 +4696,19 @@ bool ARMBaseInstrInfo::hasNOP() const { return Subtarget.getFeatureBits()[ARM::HasV6KOps]; } +bool ARMBaseInstrInfo::isTailCall(const MachineInstr &Inst) const +{ + switch (Inst.getOpcode()) { + case ARM::TAILJMPd: + case ARM::TAILJMPr: + case ARM::TCRETURNdi: + case ARM::TCRETURNri: + return true; + default: + return false; + } +} + bool ARMBaseInstrInfo::isSwiftFastImmShift(const MachineInstr *MI) const { if (MI->getNumOperands() < 4) return true; diff --git a/llvm/lib/Target/ARM/ARMBaseInstrInfo.h b/llvm/lib/Target/ARM/ARMBaseInstrInfo.h index a02c66ee9e2..2e0f1f8af91 100644 --- a/llvm/lib/Target/ARM/ARMBaseInstrInfo.h +++ b/llvm/lib/Target/ARM/ARMBaseInstrInfo.h @@ -104,6 +104,8 @@ public: getNoopForMachoTarget(NopInst); } + bool isTailCall(const MachineInstr &Inst) const override; + // Return the non-pre/post incrementing version of 'Opc'. Return 0 // if there is not such an opcode. virtual unsigned getUnindexedOpcode(unsigned Opc) const =0; |