[PATCH] D93838: [LLVM] [SCCP] : Add Function Specialization pass
Vinay Madhusudan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 13 02:18:33 PST 2021
mivnay added a comment.
In D93838#2617140 <https://reviews.llvm.org/D93838#2617140>, @SjoerdMeijer wrote:
> I have also become interested in this work as this regularly shows up as difference between clang and gcc. For the first attempt to add a function specialisation pass in D36432 <https://reviews.llvm.org/D36432> very rightfully questions were asked about compile-times and code-size, and these questions were repeated for this work. The table https://reviews.llvm.org/D36432#836883 shows good numbers, and I think in order to progress this work we need something similar. I.e. the approach here is a bit different and things may have changed. But this is also mentioned in the description:
>
>> The pass is still missing the profitability.
>
> and
>
>> I am yet to do the complete SPEC run and measure the speed /size change.
>
> I agree with @fhahn and others that this will be most useful if it gets enabled by default.
>
>> Inline cost model works for the function pointer like arguments. We are specializing other type arguments as well. I have a patch ready for proposal but waiting for D93762 <https://reviews.llvm.org/D93762> to be checked-in first..
>
> My impression is that this is not the right order of events. To address concerns about regressions, we first need to get some data on the table first I guess. Then, ideas can be developed to get it enabled by default. If that path looks credible, I am sure we get D93762 <https://reviews.llvm.org/D93762> approved/committed in no time. D93762 <https://reviews.llvm.org/D93762> is thus not going to be blocker here.
>
> And what should support this work, is that GCC has this enabled from -O3 and up, thus showing that this should be possible.
Sorry for the delayed response. Please look at the latest changes which contains the cost model. I have also shared the SPEC CPU 2017 benchmark numbers for various optimization modes we have added.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D93838/new/
https://reviews.llvm.org/D93838
More information about the llvm-commits
mailing list