[llvm] r293185 - [XRay][Arm32] Reduce the portion of the stub and implement more staging for tail calls - in LLVM
Serge Rogatch via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 26 08:17:04 PST 2017
Author: rserge
Date: Thu Jan 26 10:17:03 2017
New Revision: 293185
URL: http://llvm.org/viewvc/llvm-project?rev=293185&view=rev
Log:
[XRay][Arm32] Reduce the portion of the stub and implement more staging for tail calls - in LLVM
Summary:
This patch provides more staging for tail calls in XRay Arm32 . When the logging part of XRay is ready for tail calls, its support in the core part of XRay Arm32 may be as easy as changing the number passed to the handler from 1 to 2.
Coupled patch:
- https://reviews.llvm.org/D28674
Reviewers: dberris, rengolin
Reviewed By: dberris
Subscribers: llvm-commits, iid_iunknown, aemerson, rengolin, dberris
Differential Revision: https://reviews.llvm.org/D28673
Modified:
llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp
llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.h
Modified: llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp?rev=293185&r1=293184&r2=293185&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.cpp Thu Jan 26 10:17:03 2017
@@ -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;
Modified: llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.h?rev=293185&r1=293184&r2=293185&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.h (original)
+++ llvm/trunk/lib/Target/ARM/ARMBaseInstrInfo.h Thu Jan 26 10:17:03 2017
@@ -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;
More information about the llvm-commits
mailing list