On Wed, Feb 05, 2020 at 11:46:51AM +0100, Uros Bizjak wrote: > I think we should just enable split4 also for -O0. This would also > allow us to remove the "optimize > 0" check above and allow us to > generate a bit more optimal code even with -O0 for > TARGET_SSE_PARTIAL_REG_DEPENDENCY and TARGET_AVOID_FALSE_DEP_FOR_BMI.
The -O0 passes are: test.c.284r.ira test.c.285r.reload # placement of split2 test.c.292r.pro_and_epilogue test.c.295r.jump2 # placement of split4 # placement of split3 test.c.307r.stack test.c.308r.alignments test.c.310r.mach test.c.311r.barriers # placement of split5 test.c.316r.shorten test.c.317r.nothrow test.c.318r.dwarf2 test.c.319r.final It really doesn't matter if for -O0 STACK_REGS we enable split4 or split3, it is the same location, just split3 is better named (split before reg-stack, which is run even at -O0, rather than split before sched2, which is not run at -O0). I think the primary question is, do we for -O0 need to enable split2 (as in, will anything in pro_and_epilogue or jump2 passes benefit from the splitting and worth running two -O0 post-RA split passes), then we could go with the first patch I've posted, or nothing benefits from it in the two passes and it is ok to split only before stack, in that case we can go with the third patch. Jakub