[PATCH] D91188: Add !annotation metadata and remarks pass.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 11 07:08:56 PST 2020
fhahn marked 2 inline comments as done.
fhahn added inline comments.
================
Comment at: llvm/lib/Passes/PassBuilder.cpp:1703
+ MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM)));
+ }
+
----------------
jdoerfert wrote:
> Helper function for this?
Yep, that's much better, thanks!
================
Comment at: llvm/lib/Transforms/Scalar/AnnotationRemarks.cpp:47
+
+ for (auto &KV : Mapping)
+ ORE.emit(OptimizationRemarkMissed(REMARK_PASS, "AnnotationSummary",
----------------
paquette wrote:
> Can this be `const`?
Yep, done!
================
Comment at: llvm/lib/Transforms/Scalar/AnnotationRemarks.cpp:48
+ for (auto &KV : Mapping)
+ ORE.emit(OptimizationRemarkMissed(REMARK_PASS, "AnnotationSummary",
+ &*F.begin()->begin())
----------------
jdoerfert wrote:
> thegameg wrote:
> > Any reason this is a "missed" remark and not "analysis"?
> Yeah, I didn't notice this. Missed is not good.
> Any reason this is a "missed" remark and not "analysis"?
Nope, should be "analysis". Fixed, thanks!
================
Comment at: llvm/lib/Transforms/Scalar/AnnotationRemarks.cpp:49
+ ORE.emit(OptimizationRemarkMissed(REMARK_PASS, "AnnotationSummary",
+ &*F.begin()->begin())
+ << "Annotated " << NV("count", KV.second) << " instructions with "
----------------
paquette wrote:
> Pull out of the loop?
done, thanks!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91188/new/
https://reviews.llvm.org/D91188
More information about the llvm-commits
mailing list