25#define DEBUG_TYPE "annotation-remarks"
26#define REMARK_PASS DEBUG_TYPE
54 if (!
I.hasMetadata(LLVMContext::MD_annotation))
56 auto Iter = DebugLoc2Annotated.
insert({
I.getDebugLoc().getAsMDNode(), {}});
57 Iter.first->second.push_back(&
I);
60 I.getMetadata(LLVMContext::MD_annotation)->operands()) {
61 auto Iter = Mapping.
insert({cast<MDString>(Op.get())->getString(), 0});
66 for (
const auto &KV : Mapping)
68 F.getSubprogram(), &
F.front())
69 <<
"Annotated " <<
NV(
"count", KV.second) <<
" instructions with "
70 <<
NV(
"type", KV.first));
74 for (
auto &KV : DebugLoc2Annotated) {
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
static bool runImpl(Function &F, const TargetLowering &TLI)
This file implements a map that provides insertion order iteration.
print must be executed print the must be executed context for all instructions
A container for analyses that lazily runs them and caches their results.
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
A parsed version of the target data layout string in and methods for querying it.
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
Tracking metadata reference owned by Metadata.
This class implements a map that also provides access to all stored values in a deterministic order.
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
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.
Analysis pass providing the TargetLibraryInfo.
Provides information about what library functions are available for the current target.
Add a small namespace to avoid name clashes with the classes used in the streaming interface.
DiagnosticInfoOptimizationBase::Argument NV
This is an optimization pass for GlobalISel generic memory operations.