21 return InlineDebugLocations.contains(
DL);
24void MachineModuleSlotTracker::collectMachineFunctionMetadata(
42 Metadata.push_back(MO.getMetadata());
56 if (
const MDNode *
N = MMO->getRanges())
58 if (
const MDNode *
N = MMO->getMemCacheHint())
63 for (
const MachineFunction::VariableDbgInfo &DebugVar :
64 MF.getVariableDbgInfo()) {
73 L.insert(L.end(), MachineMDNodes.begin(), MachineMDNodes.end());
81 collectMachineFunctionMetadata(
Metadata, *TheMF);
82 MachineMDNodes.clear();
95 collectMachineFunctionMetadata(
Metadata, *TheMF, &DebugLocations);
98 if (DebugLocations.
empty())
104 for (
const auto &Entry : MachineMDNodes)
105 MachineMetadata.
insert(Entry.second);
107 for (
const auto &Entry : DebugMetadataNodes)
109 !MachineMetadata.
contains(Entry.second))
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
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)
Representation of each machine instruction.
A description of a memory reference used in the backend.
MachineModuleSlotTracker(MFGetterFnT Fn, const MachineFunction *MF)
~MachineModuleSlotTracker() override
bool shouldPrintDebugLocationInline(const DILocation *DL) const override
Return whether a debug location should be printed inline instead of by ID.
void collectMachineMDNodes(MachineMDNodeListType &L) const
void renumberMetadataForAssembly()
Renumber module and machine metadata for canonical MIR output.
MachineOperand class - Representation of each machine instruction operand.
ModuleSlotTracker(SlotTracker &Machine, const Module *M, const Function *F=nullptr)
Wrap a preinitialized SlotTracker.
void renumberMetadataForAssembly(ArrayRef< const MDNode * > AdditionalMetadata, MachineMDNodeListType *AdditionalMetadataNodes=nullptr) const
Renumber module metadata and then additional metadata for canonical assembly output.
void collectAdditionalMetadata(ArrayRef< const MDNode * > AdditionalMetadata, MachineMDNodeListType &AdditionalMetadataNodes) const
Collect metadata reachable from AdditionalMetadata but not from the module.
SmallVector< std::pair< unsigned, const MDNode * >, 0 > MachineMDNodeListType
std::pair< iterator, bool > insert(PtrType Ptr)
Inserts Ptr if and only if there is no element in the container equal to Ptr.
bool contains(ConstPtrType Ptr) const
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
This is an optimization pass for GlobalISel generic memory operations.
function_ref< MachineFunction *(const Function &)> MFGetterFnT
bool isa(const From &Val)
isa<X> - Return true if the parameter to the template is an instance of one of the template type argu...
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
A collection of metadata nodes that might be associated with a memory access used by the alias-analys...
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.