On 6/3/24 5:34 AM, Manolis Tsamis wrote:
The existing implementation of need_cmov_or_rewire and
noce_convert_multiple_sets_1 assumes that sets are either REG or SUBREG.
This commit enchances them so they can handle/rewire arbitrary set statements.

To do that a new helper struct noce_multiple_sets_info is introduced which is
used by noce_convert_multiple_sets and its helper functions. This results in
cleaner function signatures, improved efficientcy (a number of vecs and hash
set/map are replaced with a single vec of struct) and simplicity.

gcc/ChangeLog:

        * ifcvt.cc (need_cmov_or_rewire): Renamed init_noce_multiple_sets_info.
        (init_noce_multiple_sets_info): Initialize noce_multiple_sets_info.
        (noce_convert_multiple_sets_1): Use noce_multiple_sets_info and handle
        rewiring of multiple registers.
        (noce_convert_multiple_sets): Updated to use noce_multiple_sets_info.
        * ifcvt.h (struct noce_multiple_sets_info): Introduce new struct
        noce_multiple_sets_info to store info for noce_convert_multiple_sets.

gcc/testsuite/ChangeLog:

        * gcc.target/aarch64/ifcvt_multiple_sets_rewire.c: New test.

Signed-off-by: Manolis Tsamis <manolis.tsa...@vrull.eu>
OK, assuming it's been bootstrapped and regression tested on at least one primary platform.

jeff

Reply via email to