24#define DEBUG_TYPE "arm-avoid-trailing-call"
25#define ARM_AVOID_TRAILING_CALL_NAME "ARM avoid trailing call"
39char ARMAvoidTrailingCall::ID = 0;
45 return new ARMAvoidTrailingCall();
52 const ARMSubtarget &STI = MF.
getSubtarget<ARMSubtarget>();
55 for (MachineBasicBlock &
MBB : MF) {
57 if (
Next && !
Next->isEHFuncletEntry())
65 bool IsCall = !IsEmpty &&
Last->isCall() && !
Last->isReturn();
66 if (!IsEmpty && !IsCall)
69 TII.get(STI.isThumb() ? ARM::tTRAP : ARM::TRAP));
#define ARM_AVOID_TRAILING_CALL_NAME
const HexagonInstrInfo * TII
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
const ARMBaseInstrInfo * getInstrInfo() const override
FunctionPass class - This class is used to implement most global optimizations.
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
bool usesWindowsUnwindInfo() const
True if this function describes its unwind information with Windows SEH unwind opcodes (....
Represent a constant reference to a string, i.e.
NodeTy * getNextNode()
Get the next node, or nullptr for the list tail.
This is an optimization pass for GlobalISel generic memory operations.
MachineInstrBuilder BuildMI(MachineFunction &MF, const MIMetadata &MIMD, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
static bool isSEHInstruction(const MachineInstr &MI)
auto reverse(ContainerTy &&C)
auto find_if(R &&Range, UnaryPredicate P)
Provide wrappers to std::find_if which take ranges instead of having to pass begin/end explicitly.
RelativeUniformCounterPtr ValuesPtrExpr VTableAddr Next
FunctionPass * createARMAvoidTrailingCallPass()