[PATCH] D38768: Add remarks describing when a pass changes the IR instruction count of a module

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 18 10:10:08 PDT 2018


paquette marked 7 inline comments as done.
paquette added inline comments.


================
Comment at: lib/Analysis/LoopPass.cpp:154
   LI = &LIWP.getLoopInfo();
+  Module &M = *(F.getParent());
 #if 0
----------------
xbolva00 wrote:
> You also use
> Module &M = *F.getParent();
> 
> 2x Module &M = *(F.getParent())
> 1x Module &M = *F.getParent()
> 
> Please check and make it same
Changed them all to `*F.getParent()`


================
Comment at: lib/IR/LegacyPassManager.cpp:155
+                               DiagnosticLocation(), &BB);
+  R << DiagnosticInfoOptimizationBase::Argument("Pass", P->getPassName())
+    << ": IR instruction count changed from "
----------------
anemet wrote:
> DiagnosticInfoOptimizationBase::Argument -> NV (see many examples elsewhere).
This should be done in a follow-up patch.


================
Comment at: test/Other/size-remarks.ll:10
+
+; For these remarks, the "function" field in the YAML file doesn't matter.
+; Each of the testcases work by combining the output remarks with the
----------------
anemet wrote:
> Can you please file a bugzilla that we should support remarks with modules as the code region (Product:tools, Component:opt-viewer).
> 
> The tricky part is that Function is pretty deeply baked into the remarks so this may need some work.
I'll do that shortly. I'm waiting on a password reset email from bugzilla. :)


https://reviews.llvm.org/D38768





More information about the llvm-commits mailing list