On 9/7/26 8:43 AM, [email protected] wrote:
From: Kyrylo Tkachov <[email protected]>

Several helpers BITMAP_ALLOC a local bitmap and BITMAP_FREE it on every exit,
which is easy to get wrong when a new exit is added.  Convert them all to
auto_bitmap.

dead_or_predicable had three: merge_set, live and return_regs.  merge_set was
a null-or-allocated sentinel guarding the PR46315 REG_EQUAL note scrubbing;
an auto_bitmap that is only populated on the path that moves insns is
equivalent, because the scrubbing loop does nothing when the bitmap is empty.
The others - bbs_ok_for_cmove_arith is bba_sets, bb_valid_for_noce_process_p
is test_bb_temps (whose free_bitmap_and_fail goto label goes away too), and
noce_convert_multiple_sets is set_targets - are straight conversions.  No
functional change.

gcc/ChangeLog:

        * ifcvt.cc (dead_or_predicable): Make merge_set, live and return_regs
        auto_bitmap and drop the manual BITMAP_FREE calls.
        (bbs_ok_for_cmove_arith): Make bba_sets an auto_bitmap.
        (bb_valid_for_noce_process_p): Make test_bb_temps an auto_bitmap and
        return directly instead of jumping to a cleanup label.
        (noce_convert_multiple_sets): Make set_targets an auto_bitmap.

Signed-off-by: Kyrylo Tkachov <[email protected]>
OK
jeff

Reply via email to