On 9/7/26 8:43 AM, [email protected] wrote:
From: Kyrylo Tkachov <[email protected]>
The three noce conversion routines that rewrite the CFG on success -
noce_process_if_block, noce_convert_multiple_sets and
cond_move_process_if_block - each open-code the same steps: delete the
THEN (and ELSE) blocks, or for an if-then drop the fall-through edge that
bypassed THEN, redirect the test block to the join block and merge the two
when possible.
Move this into noce_finish_if_conversion and call it from all three. The
if-then case (no ELSE) is handled through if_info->else_bb being null,
matching what noce_convert_multiple_sets previously did by hand. No
functional change.
gcc/ChangeLog:
* ifcvt.cc (noce_finish_if_conversion): New function.
(noce_convert_multiple_sets): Use it. Remove now-unused locals.
(noce_process_if_block): Likewise.
(cond_move_process_if_block): Likewise.
Signed-off-by: Kyrylo Tkachov <[email protected]>
OK.
At this point I think you've got feedback on the entire set, most of
which are independent patches that can go in whenever it's convenient
for you.
Jeff