Go to the documentation of this file.
28 #define DEBUG_TYPE "arm-branch-targets"
29 #define ARM_BRANCH_TARGETS_NAME "ARM Branch Targets"
50 void ARMBranchTargets::getAnalysisUsage(
AnalysisUsage &AU)
const {
56 return new ARMBranchTargets();
64 <<
"********** Function: " << MF.
getName() <<
'\n');
77 bool MadeChange =
false;
80 bool IsFirstBB = &
MBB == &MF.
front();
93 addBTI(
TII,
MBB, IsFirstBB);
110 unsigned OpCode = ARM::t2BTI;
111 unsigned MIFlags = 0;
115 return MI.isMetaInstruction();
123 <<
"' to replace with PACBTI\n");
124 OpCode = ARM::t2PACBTI;
126 auto NextMBBI = std::next(
MBBI);
133 << (OpCode == ARM::t2BTI ?
"BTI" :
"PACBTI")
134 <<
"' instr into BB '" <<
MBB.
getName() <<
"'\n");
ARMFunctionInfo - This class is derived from MachineFunctionInfo and contains private ARM-specific in...
This is an optimization pass for GlobalISel generic memory operations.
virtual const TargetInstrInfo * getInstrInfo() const
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
DebugLoc findDebugLoc(instr_iterator MBBI)
Find the next valid DebugLoc starting at MBBI, skipping any DBG_VALUE and DBG_LABEL instructions.
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
Ty * getInfo()
getInfo - Keep track of various per-function pieces of information for backends that would like to do...
void eraseFromParent()
This method unlinks 'this' from the containing function and deletes it.
Represent the analysis usage information of a pass.
const HexagonInstrInfo * TII
FunctionPass * createARMBranchTargetsPass()
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
const TargetSubtargetInfo & getSubtarget() const
getSubtarget - Return the subtarget for which this machine code is being compiled.
Representation of each machine instruction.
bool hasAddressTaken() const
Test whether this block is used as as something other than the target of a terminator,...
bool branchTargetEnforcement() const
StringRef getName() const
getName - Return the name of the corresponding LLVM function.
INITIALIZE_PASS(ARMBranchTargets, "arm-branch-targets", ARM_BRANCH_TARGETS_NAME, false, false) void ARMBranchTargets
size_type count(ConstPtrType Ptr) const
count - Return 1 if the specified pointer is in the set, 0 otherwise.
instr_iterator instr_end()
bool isEHPad() const
Returns true if the block is a landing pad.
StringRef - Represent a constant reference to a string, i.e.
MachineBasicBlock MachineBasicBlock::iterator MBBI
#define ARM_BRANCH_TARGETS_NAME
MachineJumpTableEntry - One jump table in the jump table info.
MachineInstrBuilder BuildMI(MachineFunction &MF, const MIMetadata &MIMD, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
const MachineInstrBuilder & setMIFlags(unsigned Flags) const
FunctionPass class - This class is used to implement most global optimizations.
const MachineJumpTableInfo * getJumpTableInfo() const
getJumpTableInfo - Return the jump table info object for the current function.
StringRef getName() const
Return the name of the corresponding LLVM basic block, or an empty string.
auto find_if_not(R &&Range, UnaryPredicate P)
std::pair< iterator, bool > insert(PtrType Ptr)
Inserts Ptr if and only if there is no element in the container equal to Ptr.