[PATCH] D155103: [FuncSpec] Split the specialization bonus into CodeSize and Latency.
Alexandros Lamprineas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 12 11:04:52 PDT 2023
labrinea created this revision.
labrinea added reviewers: ChuanqiXu, chill.
Herald added subscribers: hoy, ormris, hiraditya.
Herald added a project: All.
labrinea requested review of this revision.
Herald added a project: LLVM.
Currently we use a combined metric TargetTransformInfo::TCK_SizeAndLatency
when estimating the specialization bonus. This is suboptimal, and in some
cases erroneous. For example we shouldn't be weighting the codesize decrease
attributed to constant propagation by the block frequency of the dead code.
Instead only the latency savings should be weighted by block frequency. The
total codesize savings from all the specialization arguments should be
deducted from the specialization cost.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D155103
Files:
llvm/include/llvm/Transforms/IPO/FunctionSpecialization.h
llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
llvm/unittests/Transforms/IPO/FunctionSpecializationTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155103.539644.patch
Type: text/x-patch
Size: 18927 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230712/480e2c80/attachment.bin>
More information about the llvm-commits
mailing list