[PATCH] D157123: [FuncSpec] Rework the discardment logic for unprofitable specializations.
Alexandros Lamprineas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 7 01:10:32 PDT 2023
labrinea added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/FunctionSpecialization.cpp:844-845
+ if (!ForceSpecialization &&
+ (VisitorBonus.CodeSize <= SpecCost / CodeSizeRatio ||
+ VisitorBonus.Latency / BonusRatio < VisitorBonus.CodeSize) &&
+ InliningBonus / BonusRatio < SpecCost)
----------------
ChuanqiXu wrote:
> I am wondering if the condition `||` may be too strict. My rough feeling is: it is good enough to perform specialization if we can see one of the benefits.
Without the latency condition CTMark triggers too much. The two conditions seem to work quite well in conjunction, CTMark gets less specializations than before, which is good for compile times, but we still specialize the interesting cases (mcf, exchange).
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