[PATCH] D70584: [AutoFDO] Statistic for context sensitive profile guided inlining

Wei Mi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 11 16:10:00 PST 2019


wmi accepted this revision.
wmi added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:879
   if (Cost.isNever()) {
-    ORE->emit(OptimizationRemark(DEBUG_TYPE, "Not inline", DLoc, BB)
+    ORE->emit(OptimizationRemark("sample-profile-inline", "NotInline", DLoc, BB)
               << "incompatible inlining");
----------------
wenlei wrote:
> wmi wrote:
> > The first parameter in the declaration of OptimizationRemark is "const char *PassName", so why not use DEBUG_TYPE?  
> > 
> > I feel "NeverInline" may be more clear than "NotInline" in terms of showing it is illegal to inline. 
> DEBUG_TYPE is "sample-profile" and I feel it's too broad for practical uses as it covers sample usages, weight propagation, and inlining. I wanted to have something that only gives me inlining remarks, thus using  "sample-profile-inline" instead here.
> 
> Good point about "NeverInline", will change. 
Then maybe define a macro for it like #define CSINLINE DEBUG_TYPE "-inline".


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70584





More information about the llvm-commits mailing list