24#define DEBUG_TYPE "annotation-remarks"
25#define REMARK_PASS DEBUG_TYPE
53 if (!
I.hasMetadata(LLVMContext::MD_annotation))
55 auto Iter = DebugLoc2Annotated.
insert({
I.getDebugLoc().getAsMDNode(), {}});
56 Iter.first->second.push_back(&
I);
59 I.getMetadata(LLVMContext::MD_annotation)->operands()) {
61 isa<MDString>(
Op.get())
62 ? cast<MDString>(
Op.get())->getString()
63 : cast<MDString>(cast<MDTuple>(
Op.get())->getOperand(0).get())
65 auto Iter = Mapping.
insert({AnnotationStr, 0});
70 for (
const auto &KV : Mapping)
72 F.getSubprogram(), &
F.front())
73 <<
"Annotated " <<
NV(
"count", KV.second) <<
" instructions with "
74 <<
NV(
"type", KV.first));
78 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.
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.
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.