[vect-patterns][RFC] Refactor widening patterns to allow internal_fn's

Joel Hutton Joel.Hutton@arm.com
Mon Jun 7 13:29:35 GMT 2021


Hi all,

This refactor allows widening patterns (such as widen_plus/widen_minus) to be represented as
either internal_fns or tree_codes. The widening patterns were originally added as tree codes with the expectation that they would be refactored later.

[vect-patterns] Refactor as internal_fn's

Refactor vect-patterns to allow patterns to be internal_fns starting
with widening_plus/minus patterns.


gcc/ChangeLog:

        * gimple-match.h (class code_helper): Move code_helper class to more visible header.
        * internal-fn.h (internal_fn_name): Add internal_fn range check.
        * optabs-tree.h (supportable_convert_operation): Change function prototypes to use code_helper.
        * tree-vect-patterns.c (vect_recog_widen_op_pattern): Refactor to use code_helper.
        * tree-vect-stmts.c (vect_gen_widened_results_half): Refactor to use code_helper, build internal_fns.
        (vect_create_vectorized_promotion_stmts): Refactor to use code_helper.
        (vectorizable_conversion): Refactor to use code_helper.
        (supportable_widening_operation): Refactor to use code_helper.
        (supportable_narrowing_operation): Refactor to use code_helper.
        * tree-vectorizer.h (supportable_widening_operation): Refactor to use code_helper.
        (supportable_narrowing_operation): Refactor to use code_helper.
        * tree.h (class code_helper): Refactor to use code_helper.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rb14487.patch
Type: application/octet-stream
Size: 30270 bytes
Desc: rb14487.patch
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20210607/705cfcd6/attachment-0001.obj>


More information about the Gcc-patches mailing list