On 3/22/23 04:03, Richard Biener via Gcc-patches wrote:
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.

Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.

OK?

For the record, the profile was (after the delete_trivially_dead_insns
fix)

Samples: 289K of event 'cycles:u', Event count (approx.): 384226334976
Overhead       Samples  Command  Shared Object     Symbol
    3.52%          9747  cc1      cc1               [.] bb_is_just_return
#

and after the fix bb_is_just_return has no recorded samples anymore.

Thanks,
Richard.

        PR rtl-optimization/109237
        * cfgcleanup.cc (bb_is_just_return): Walk insns backwards.
OK.  Sorry if I introduced this hog.

jeff

Reply via email to