27 #define DEBUG_TYPE "annotation-remarks" 28 #define REMARK_PASS DEBUG_TYPE 38 if (!
I.hasMetadata(LLVMContext::MD_annotation))
41 I.getMetadata(LLVMContext::MD_annotation)->operands()) {
42 auto Iter = Mapping.
insert({cast<MDString>(
Op.get())->getString(), 0});
48 for (
const auto &KV : Mapping)
50 <<
"Annotated " <<
NV(
"count", KV.second) <<
" instructions with " 51 <<
NV(
"type", KV.first));
78 "Annotation Remarks",
false,
false)
83 return new AnnotationRemarksLegacy();
Tracking metadata reference owned by Metadata.
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
DiagnosticInfoOptimizationBase::Argument NV
This class represents lattice values for constants.
This class implements a map that also provides access to all stored values in a deterministic order.
void initializeAnnotationRemarksLegacyPass(PassRegistry &)
static bool runOnFunction(Function &F, bool PostInlining)
A set of analyses that are preserved following a run of a transformation pass.
Represent the analysis usage information of a pass.
FunctionPass class - This class is used to implement most global optimizations.
Used in the streaming interface as the general argument type.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
INITIALIZE_PASS_END(RegBankSelect, DEBUG_TYPE, "Assign register bank of generic virtual registers", false, false) RegBankSelect
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
void setPreservesAll()
Set by analyses that do not transform their input at all.
inst_range instructions(Function *F)
A container for analyses that lazily runs them and caches their results.
FunctionPass * createAnnotationRemarksLegacyPass()
Add a small namespace to avoid name clashes with the classes used in the streaming interface.