[all-commits] [llvm/llvm-project] 5bfeff: Reland [FuncSpec] Split the specialization bonus i...
Alexandros Lamprineas via All-commits
all-commits at lists.llvm.org
Wed Aug 2 04:51:51 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5bfefff1c44fd992b673e1ff9c9f1865f9d81af1
https://github.com/llvm/llvm-project/commit/5bfefff1c44fd992b673e1ff9c9f1865f9d81af1
Author: Alexandros Lamprineas <alexandros.lamprineas at arm.com>
Date: 2023-08-02 (Wed, 02 Aug 2023)
Changed paths:
M llvm/include/llvm/Transforms/IPO/FunctionSpecialization.h
M llvm/lib/Transforms/IPO/FunctionSpecialization.cpp
M llvm/unittests/Transforms/IPO/FunctionSpecializationTest.cpp
Log Message:
-----------
Reland [FuncSpec] Split the specialization bonus into CodeSize and Latency.
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.
Differential Revision: https://reviews.llvm.org/D155103
More information about the All-commits
mailing list