Go to the documentation of this file.
27 #define DEBUG_TYPE "annotation-remarks"
28 #define REMARK_PASS DEBUG_TYPE
56 if (!
I.hasMetadata(LLVMContext::MD_annotation))
58 auto Iter = DebugLoc2Annotated.
insert({
I.getDebugLoc().getAsMDNode(), {}});
59 Iter.first->second.push_back(&
I);
62 I.getMetadata(LLVMContext::MD_annotation)->operands()) {
63 auto Iter = Mapping.
insert({cast<MDString>(
Op.get())->getString(), 0});
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) {
96 getAnalysis<TargetLibraryInfoWrapperPass>().getTLI(
F);
112 "Annotation Remarks",
false,
false)
118 return new AnnotationRemarksLegacy();
A set of analyses that are preserved following a run of a transformation pass.
This is an optimization pass for GlobalISel generic memory operations.
A parsed version of the target data layout string in and methods for querying it.
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
Code Generation Notes for reduce the size of the ISel and reduce repetition in the implementation In a small number of this can cause even when no optimisation has taken place Instructions
This class implements a map that also provides access to all stored values in a deterministic order.
DiagnosticInfoOptimizationBase::Argument NV
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
Represent the analysis usage information of a pass.
FunctionPass * createAnnotationRemarksLegacyPass()
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
inst_range instructions(Function *F)
INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
static bool runOnFunction(Function &F, bool PostInlining)
void setPreservesAll()
Set by analyses that do not transform their input at all.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
void initializeAnnotationRemarksLegacyPass(PassRegistry &)
Provides information about what library functions are available for the current target.
A container for analyses that lazily runs them and caches their results.
FunctionPass class - This class is used to implement most global optimizations.
AnalysisUsage & addRequired()
Add a small namespace to avoid name clashes with the classes used in the streaming interface.
Analysis pass providing the TargetLibraryInfo.
Tracking metadata reference owned by Metadata.