On November 26, 2019 4:39:09 PM GMT+01:00, Christophe Lyon <christophe.l...@linaro.org> wrote: >On Tue, 26 Nov 2019 at 16:18, Wilco Dijkstra <wilco.dijks...@arm.com> >wrote: >> >> Hi, >> >> While code hoisting generally improves codesize, it can affect >performance >> negatively. Benchmarking shows it doesn't help SPEC and negatively >affects >> embedded benchmarks. Since the impact is relatively small with -O2 >and mainly >> affects -O3, the simplest option is to disable code hoisting for -O3 >and higher. >> >> OK for commit? >> > >Hi, > >Some time ago, you proposed to enable code hoisting for -Os instead, >and this is the approach that was chosen >in arm-9-branch. Why are you proposing a different setting for trunk?
These kind of tweaks also single out targets in intransparent ways for the user and for debugging code generation issues. But it's your target... Richard >Thanks, > >Christophe > >> ChangeLog: >> 2019-11-26 Wilco Dijkstra <wdijk...@arm.com> >> >> PR tree-optimization/80155 >> * common/config/arm/arm-common.c >(arm_option_optimization_table): >> Disable -fcode-hoisting with -O3. >> -- >> >> diff --git a/gcc/common/config/arm/arm-common.c >b/gcc/common/config/arm/arm-common.c >> index >b761d3abd670a144a593c4b410b1e7fbdcb52f56..3e11f21b7dd76cc071b645c32a6fdb4a92511279 >100644 >> --- a/gcc/common/config/arm/arm-common.c >> +++ b/gcc/common/config/arm/arm-common.c >> @@ -39,6 +39,8 @@ static const struct default_options >arm_option_optimization_table[] = >> /* Enable section anchors by default at -O1 or higher. */ >> { OPT_LEVELS_1_PLUS, OPT_fsection_anchors, NULL, 1 }, >> { OPT_LEVELS_FAST, OPT_fsched_pressure, NULL, 1 }, >> + /* Disable code hoisting with -O3 or higher. */ >> + { OPT_LEVELS_3_PLUS, OPT_fcode_hoisting, NULL, 0 }, >> { OPT_LEVELS_NONE, 0, NULL, 0 } >> }; >>