[PATCH] D93838: [LLVM] [SCCP] : Add Function Specialization pass

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 15 04:08:31 PDT 2021


fhahn added a comment.

In D93838#2687738 <https://reviews.llvm.org/D93838#2687738>, @ChuanqiXu wrote:

> I just run the SPEC2017 intrate fullLTO with this patch  and I limits the iterations with 10 times and 20 times.
> Here is my result
>
> | benchmark     | Speedup with limiting 10 iteration | Speedup with limiting 20 iteration |
> | ------------- | ---------------------------------- | ---------------------------------- |
> | 505.mcf_r     | 8.4%                               | 8.4%                               |
> | 520.omnetpp_r | 0.4%                               | 4%                                 |
> |
>
> I didn't run 548 since it requires fortran frontend to emit LLVM IR. Other benchmarks in SPEC2017 intrate don't show significant result.
>
> It is interesting that the result of `520.omnetpp_r` is different from the result before, which shows a great regression.
>
> In D93838#2624107 <https://reviews.llvm.org/D93838#2624107>, @mivnay wrote:
>
>> F15848356: function_specialize_spec_2017_graviton2.png <https://reviews.llvm.org/F15848356>
>
> It is also interesting that the result diff with different limitations.
>
> Then there are compile-time/code-size changes:
>
> | benchmark       | compile-time change with limiting 10 iteration | compile-time change with limiting 20 iteration |
> | --------------- | ---------------------------------------------- | ---------------------------------------------- |
> | 500.perlbench_r | 27%                                            | 27%                                            |
> | 502.gcc_r       | 9%                                             | 9%                                             |
> | 505.mcf_r       | 17%                                            | 17%                                            |
> | 520.omnetpp_r   | 10%                                            | 14%                                            |
> | 523.xalancbmk_r | 3%                                             | 5%                                             |
> |
>
> Other benchmarks including 525, 531, 541 and 557 don't show significant change. 
> The time change listed here are the compilation time for the whole compiling process instead of linking time.
>
> Finally, the code size change:
>
> | benchmark     | code size change with limiting 10 iteration | code size change with limiting 20 iteration |
> | ------------- | ------------------------------------------- | ------------------------------------------- |
> | 505.mcf_r     | 14%                                         | 14%                                         |
> | 520.omnetpp_r | 13%                                         | 13%                                         |
> |
>
> The code sizes for other benchmarks don't show significant change.

Thanks for sharing those sobering numbers. These seem to indicate that just adjusting the threshold may not be enough to control the excessive compile-time.


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

https://reviews.llvm.org/D93838



More information about the llvm-commits mailing list