26struct FEntryInserter {
27 bool run(MachineFunction &MF);
32 FEntryInserterLegacy() : MachineFunctionPass(ID) {
36 bool runOnMachineFunction(MachineFunction &
F)
override {
37 return FEntryInserter().run(
F);
44 if (!FEntryInserter().
run(MF))
50 const std::string FEntryName = std::string(
52 if (FEntryName !=
"true")
55 auto &FirstMBB = *MF.
begin();
58 TII->get(TargetOpcode::FENTRY_CALL));
62char FEntryInserterLegacy::ID = 0;
64INITIALIZE_PASS(FEntryInserterLegacy,
"fentry-insert",
"Insert fentry calls",
const HexagonInstrInfo * TII
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
LLVM_ABI StringRef getValueAsString() const
Return the attribute's value as a string.
PreservedAnalyses run(MachineFunction &MF, MachineFunctionAnalysisManager &MFAM)
Attribute getFnAttribute(Attribute::AttrKind Kind) const
Return the attribute for the given attribute kind.
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.
Function & getFunction()
Return the LLVM function that this machine code represents.
static LLVM_ABI PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
virtual const TargetInstrInfo * getInstrInfo() const
PointerTypeMap run(const Module &M)
Compute the PointerTypeMap for the module M.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI char & FEntryInserterID
This pass inserts FEntry calls.
MachineInstrBuilder BuildMI(MachineFunction &MF, const MIMetadata &MIMD, const MCInstrDesc &MCID)
Builder interface. Specify how to create the initial instruction itself.
AnalysisManager< MachineFunction > MachineFunctionAnalysisManager
LLVM_ABI void initializeFEntryInserterLegacyPass(PassRegistry &)
LLVM_ABI PreservedAnalyses getMachineFunctionPassPreservedAnalyses()
Returns the minimum set of Analyses that all machine function passes must preserve.