24#define DEBUG_TYPE "annotation-remarks"
25#define REMARK_PASS DEBUG_TYPE
53 if (!
I.hasMetadata(LLVMContext::MD_annotation))
55 DebugLoc2Annotated[
I.getDebugLoc().getAsMDNode()].push_back(&
I);
58 I.getMetadata(LLVMContext::MD_annotation)->operands()) {
60 isa<MDString>(
Op.get())
61 ? cast<MDString>(
Op.get())->getString()
62 : cast<MDString>(cast<MDTuple>(
Op.get())->getOperand(0).get())
64 Mapping[AnnotationStr]++;
68 for (
const auto &KV : Mapping)
70 F.getSubprogram(), &
F.front())
71 <<
"Annotated " <<
NV(
"count", KV.second) <<
" instructions with "
72 <<
NV(
"type", KV.first));
76 for (
auto &KV : DebugLoc2Annotated) {
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
Expand Atomic instructions
static bool runImpl(Function &F, const TargetLowering &TLI)
This file implements a map that provides insertion order iteration.
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),...
This class represents an Operation in the Expression.
A parsed version of the target data layout string in and methods for querying it.
Tracking metadata reference owned by Metadata.
This class implements a map that also provides access to all stored values in a deterministic order.
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.
StringRef - Represent a constant reference to a string, i.e.
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.
This is an optimization pass for GlobalISel generic memory operations.
Used in the streaming interface as the general argument type.