[PATCH] D89240: Add initial infra to convert annotations to MD and display summary remarks (WIP)

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 9 10:15:43 PST 2020


fhahn marked an inline comment as done.
fhahn added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:908
+
+  MPM.add(createAnnotationRemarksPass());
 }
----------------
thegameg wrote:
> How does this get scheduled for LTO? This should probably run after IR linking and all that (when prototyping, I put it in TargetPassConfig for better results, but that doesn't sound like the right place to schedule passes like this in general)
I also added it to the end of the LTO pipeline. Still need to add this for the new PM.


================
Comment at: llvm/lib/Transforms/Scalar/AnnotationRemarks.cpp:37
+  for (Instruction &I : instructions(F)) {
+    if (!I.hasMetadata("annotation"))
+      continue;
----------------
thegameg wrote:
> One other way would be to walk back the uses of the metadata, but it might not be worth it since it would require a ModulePass.
Yeah that would probably be better. I'll try to update the code.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D89240/new/

https://reviews.llvm.org/D89240



More information about the llvm-commits mailing list