aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2020-10-02 18:41:35 +0200
committerMartin Jambor <mjambor@suse.cz>2020-10-02 18:41:35 +0200
commit315848246657607d5acd9bca29d64d98a4c5f042 (patch)
treee07cdcae1759f6aac27f5d6e3dd65f5544c1973b /gcc/cp/class.c
parent91153e0af9a457a0085bb796613a81404480d5af (diff)
downloadgcc-315848246657607d5acd9bca29d64d98a4c5f042.zip
gcc-315848246657607d5acd9bca29d64d98a4c5f042.tar.gz
gcc-315848246657607d5acd9bca29d64d98a4c5f042.tar.bz2
ipa-cp: Separate and increase the large-unit parameter
A previous patch in the series has taught IPA-CP to identify the important cloning opportunities in 548.exchange2_r as worthwhile on their own, but the optimization is still prevented from taking place because of the overall unit-growh limit. This patches raises that limit so that it takes place and the benchmark runs 30% faster (on AMD Zen2 CPU at least). Before this patch, IPA-CP uses the following formulae to arrive at the overall_size limit: base = MAX(orig_size, param_large_unit_insns) unit_growth_limit = base + base * param_ipa_cp_unit_growth / 100 since param_ipa_cp_unit_growth has default 10, param_large_unit_insns has default value 10000. The problem with exchange2 (at least on zen2 but I have had a quick look on aarch64 too) is that the original estimated unit size is 10513 and so param_large_unit_insns does not apply and the default limit is therefore 11564 which is good enough only for one of the ideal 8 clonings, we need the limit to be at least 16291. I would like to raise param_ipa_cp_unit_growth a little bit more soon too, but most certainly not to 55. Therefore, the large_unit must be increased. In this patch, I decided to decouple the inlining and ipa-cp large-unit parameters. It also makes sense because IPA-CP uses it only at -O3 while inlining also at -O2 (IIUC). But if we agree we can try raising param_large_unit_insns to 13-14 thousand "instructions," perhaps it is not necessary. But then again, it may make sense to actually increase the IPA-CP limit further. I plan to experiment with IPA-CP tuning on a larger set of programs. Meanwhile, mainly to address the 548.exchange2_r regression, I'm suggesting this simple change. gcc/ChangeLog: 2020-09-07 Martin Jambor <mjambor@suse.cz> * params.opt (ipa-cp-large-unit-insns): New parameter. * ipa-cp.c (get_max_overall_size): Use the new parameter.
Diffstat (limited to 'gcc/cp/class.c')
0 files changed, 0 insertions, 0 deletions