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

Francis Visoiu Mistrih via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 6 12:07:16 PST 2020


thegameg added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:908
+
+  MPM.add(createAnnotationRemarksPass());
 }
----------------
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)


================
Comment at: llvm/lib/Transforms/Scalar/AnnotationRemarks.cpp:37
+  for (Instruction &I : instructions(F)) {
+    if (!I.hasMetadata("annotation"))
+      continue;
----------------
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.


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