[PATCH] D120908: [FuncSpec] Enable function specialize for a constant range of arguments.

Joseph Faulls via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 4 01:42:31 PST 2022


Joe added a comment.

In D120908#3358301 <https://reviews.llvm.org/D120908#3358301>, @labrinea wrote:

> My understanding is that function specialization of such constant arguments is controlled by the option `-function-specialization-for-literal-constant`. That is disabled by default as it increases compilation times. I measured how it affects instruction count using perf when compiling the llvm test suite. It was generally neutral except for the benchmark SPASS which was regressed by 4%.

Right I see. EnableSpecializationForLiteralConstant was an oversight for me. So what if EnableSpecializationForLiteralConstant is enabled, yet a function //only// takes literal constants, like in the unit test supplied. isArgumentInteresting would exit early due to the isOverdefined check. Should this be changed as is in this revision, but the change to getPossibleConstants be reverted?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120908



More information about the llvm-commits mailing list