[PATCH] D157123: [FuncSpec] Rework the discardment logic for unprofitable specializations.

Alexandros Lamprineas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 8 23:59:21 PDT 2023


labrinea added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/FunctionSpecialization.cpp:851
+        // Minimum inlining savings.
+        bool HasInliningBonus = Score > MinInliningSavings * FuncSize / 100;
+        // Minimum codesize savings.
----------------
labrinea wrote:
> labrinea wrote:
> > ChuanqiXu wrote:
> > > ChuanqiXu wrote:
> > > > What's the meaning of the magic number `100`?
> > > nit: may this be slightly more clear?
> > Percentage. We can't do floating point decision so we multiply by MinSavings and then divide by 100.
> Okay
*division 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157123



More information about the llvm-commits mailing list