rtl-optimization/109237 - speedup bb_is_just_return
authorRichard Biener <rguenther@suse.de>
Wed, 22 Mar 2023 09:05:19 +0000 (10:05 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 27 Mar 2023 06:54:30 +0000 (08:54 +0200)
commit776a5bb5894315ab144dc74222fc580fde8fdd87
treeba6dd13bac13ff82c6e3e9f4bad4b43db6600d74
parent4cbd5ef0350d8ab04993eb4c48ab80999fb4f358
rtl-optimization/109237 - speedup bb_is_just_return

For the testcase bb_is_just_return is on top of the profile, changing
it to walk BB insns backwards puts it off the profile.  That's because
in the forward walk you have to process possibly many debug insns
but in a backward walk you very likely run into control insns first.

PR rtl-optimization/109237
* cfgcleanup.cc (bb_is_just_return): Walk insns backwards.
gcc/cfgcleanup.cc