middle-end: Refactor and expose some vectorizer helper functions.
authorTamar Christina <tamar.christina@arm.com>
Sun, 13 Dec 2020 13:53:48 +0000 (13:53 +0000)
committerTamar Christina <tamar.christina@arm.com>
Sun, 13 Dec 2020 13:53:48 +0000 (13:53 +0000)
commit10bbba9145700e2c3b4709c1041c66d8ff85c7f1
treeb8c7d225b028590a0716073890e91419bb899974
parent501f470267445e037614649639d17a1b32b4a9aa
middle-end: Refactor and expose some vectorizer helper functions.

This is a small refactoring which exposes some helper functions in the
vectorizer so they can be used in other places.

gcc/ChangeLog:

* tree-vect-patterns.c (vect_mark_pattern_stmts): Remove static inline.
* tree-vect-slp.c (vect_create_new_slp_node): Remove static and only
set smts if valid.
* tree-vectorizer.c (vec_info::add_pattern_stmt): New.
(vec_info::set_vinfo_for_stmt): Optionally enforce read-only.
* tree-vectorizer.h (struct _slp_tree): Use new types.
(lane_permutation_t, lane_permutation_t): New.
(vect_create_new_slp_node, vect_mark_pattern_stmts): New.
gcc/tree-vect-patterns.c
gcc/tree-vect-slp.c
gcc/tree-vectorizer.c
gcc/tree-vectorizer.h