19void MachineModuleSlotTracker::processMachineFunctionMetadata(
22 for (
const MachineBasicBlock &
MBB : MF)
24 if (MDNode *
N =
MI.getHeapAllocMarker())
26 if (MDNode *
N =
MI.getPCSections())
28 if (MDNode *
N =
MI.getMMRAMetadata())
31 for (
const MachineOperand &MO :
MI.operands())
35 for (
const MachineMemOperand *MMO :
MI.memoperands()) {
36 AAMDNodes AAInfo = MMO->getAAInfo();
47 if (
const MDNode *
N = MMO->getRanges())
49 if (
const MDNode *
N = MMO->getMemCacheHint())
54 for (
const MachineFunction::VariableDbgInfo &DebugVar :
55 MF.getVariableDbgInfo()) {
60void MachineModuleSlotTracker::processMachineModule(
62 bool ShouldInitializeAllMetadata) {
63 if (ShouldInitializeAllMetadata) {
65 if (&F != &TheFunction)
69 processMachineFunctionMetadata(AST, *TheMF);
76void MachineModuleSlotTracker::processMachineFunction(
78 bool ShouldInitializeAllMetadata) {
79 if (!ShouldInitializeAllMetadata && F == &TheFunction) {
82 processMachineFunctionMetadata(AST, *TheMF);
95 ShouldInitializeAllMetadata),
98 bool ShouldInitializeAllMetadata) {
99 this->processMachineModule(AST, M, ShouldInitializeAllMetadata);
102 bool ShouldInitializeAllMetadata) {
103 this->processMachineFunction(AST, F, ShouldInitializeAllMetadata);
static const Function * getParent(const Value *V)
Module.h This file contains the declarations for the Module class.
static Function * getFunction(FunctionType *Ty, const Twine &Name, Module *M)
Abstract interface of slot tracker storage.
virtual unsigned getNextMetadataSlot()=0
virtual void createMetadataSlot(const MDNode *)=0
~MachineModuleSlotTracker() override
void collectMachineMDNodes(MachineMDNodeListType &L) const
MachineModuleSlotTracker(MFGetterFnT Fn, const MachineFunction *MF, bool ShouldInitializeAllMetadata=true)
ModuleSlotTracker(SlotTracker &Machine, const Module *M, const Function *F=nullptr)
Wrap a preinitialized SlotTracker.
std::vector< std::pair< unsigned, const MDNode * > > MachineMDNodeListType
void collectMDNodes(MachineMDNodeListType &L, unsigned LB, unsigned UB) const
void setProcessHook(std::function< void(AbstractSlotTrackerStorage *, const Module *, bool)>)
A Module instance is used to store all the information related to an LLVM module.
This is an optimization pass for GlobalISel generic memory operations.
function_ref< MachineFunction *(const Function &)> MFGetterFnT
MDNode * NoAliasAddrSpace
The tag specifying the noalias address spaces.
MDNode * TBAAStruct
The tag for type-based alias analysis (tbaa struct).
MDNode * Scope
The tag for alias scope specification (used with noalias).
MDNode * TBAA
The tag for type-based alias analysis.
MDNode * NoAlias
The tag specifying the noalias scope.