[Bug tree-optimization/99199] [9/10/11 Regression] Very large boolean expression leads to quite a few return statements

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 22 16:47:26 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99199

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Until before pro_and_epilogue we have a bb with just code_label, note and
return reg use which has 65 predecessors.
The pro_and_epilogue pass turns that into 65 simple_return jumps.
The ret insns at the end are there since the bbro pass, before that they are at
various spots in the IL and depending on the branch probabilities could even
make sense.
I guess we'd need some simplified crossjumping either during the bbro pass when
going from cfglayout mode into cfgrtl mode, or afterwards (but not too many
passes are left there) that would be able to cross-jump bbs containing those:
(code_label 1552 999 925 128 147 (nil) [1 uses])
(note 925 1552 1389 128 [bb 128] NOTE_INSN_BASIC_BLOCK)
(insn 1389 925 926 128 (use (reg/i:QI 0 ax)) -1
     (nil))
(jump_insn 926 1389 927 128 (simple_return) 837 {simple_return_internal}
     (nil)
 -> simple_return)


More information about the Gcc-bugs mailing list