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

Adam Nemet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 11 11:52:31 PDT 2017


anemet added inline comments.


================
Comment at: lib/IR/LegacyPassManager.cpp:1553
       LocalChanged |= FP->runOnFunction(F);
+      int FinalCount = getModuleInstrCount(*F.getParent());
+      emitIRSizeChangedRemark(FP, *F.getParent(), OriginalCount, FinalCount);
----------------
davide wrote:
> `opt-remarks` is a function pass and here you're considering as unit of IR the whole module. I think the function pass manager *should* only operate on functions. This bit seems a little odd, to me.
> 
> I'd love to hear @chandlerc's thoughts on this,
This is not using the ORE pass for layering reasons.  Instead, it works directly with the LLVMContext::diagnose interface.


https://reviews.llvm.org/D38768





More information about the llvm-commits mailing list