[PATCH] D104365: [FuncSpec] Enabling specializing direct constant

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 29 19:29:20 PDT 2021


ChuanqiXu added a comment.

In D104365#2847333 <https://reviews.llvm.org/D104365#2847333>, @SjoerdMeijer wrote:

> In D104365#2843823 <https://reviews.llvm.org/D104365#2843823>, @ChuanqiXu wrote:
>
>> Add an option to control the behavior.
>>
>> Then I did some statistics for SPEC2017int
>>
>> The total number of specialized functions increased about 18% (from 49 to 58)
>>
>> Then I didn't find significant compile-time change with turning option on.
>>
>> I wonder if this means that we can turn this option on by default.
>
> This looks good to me. Let's start with having this off by default. Like I mentioned earlier, for this to be enabled too by default we probably need some more numbers than only SPEC, but also e.g. a bootstrap build, llvm test suite, sqlite, etc. But now that we have this option, we can experiment with this, get more numbers, and also address some other TODOs before we try to enable function specialisation by default.

Sure.

>> The total number of specialized functions increased about 18% (from 49 to 58)
>
> I am surprised by this big number of specialisations. I remember seeing only 4 specialisations for SPEC2017int.

It's surprising. My codebase is trunk with LTO. And I printed log for every function specialized. So I am pretty sure that I got the right number.


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

https://reviews.llvm.org/D104365



More information about the llvm-commits mailing list