[llvm] [FuncSpec] Only compute Latency bonus when necessary (PR #113159)
Alexandros Lamprineas via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 21 07:20:02 PDT 2024
================
@@ -97,21 +98,29 @@ class FunctionSpecializationTest : public testing::Test {
GetAC);
}
- Bonus getInstCost(Instruction &I, bool SizeOnly = false) {
+ Cost getInstCodeSize(Instruction &I, bool SizeOnly = false) {
----------------
labrinea wrote:
s/getInstCodeSize/getCodeSizeSavings
The parameter name SizeOnly becomes confusing size the function is now supposed to only compute CodeSize, whereas before it conditionally accounted for Latency too. Perhaps rename the argument to `HasLatencySavings` and default initialize with `true`?
https://github.com/llvm/llvm-project/pull/113159
More information about the llvm-commits
mailing list