refactor SLP constant insertion and provde entry insert helper
authorRichard Biener <rguenther@suse.de>
Fri, 3 Jul 2020 08:09:39 +0000 (10:09 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 3 Jul 2020 09:29:16 +0000 (11:29 +0200)
commit9e5508c2d006f2d4f8670e6c3fed770ac1c85e64
tree3fe50f35e5da1a34dd92b35c2ac38ef5461bc743
parent26b538cd81b9692eaf519fa1743ca8c282048793
refactor SLP constant insertion and provde entry insert helper

This provides helpers to insert stmts on region entry abstracted
from loop/basic-block split out from vec_init_vector and used
from the SLP constant code generation path.  The SLP constant
code generation path is also changed to avoid needless SSA
copying since we can store VECTOR_CSTs directly in the vectorized
defs array, improving the IL from the vectorizer.

2020-07-03  Richard Biener  <rguenther@suse.de>

* tree-vectorizer.h (vec_info::insert_on_entry): New.
(vec_info::insert_seq_on_entry): Likewise.
* tree-vectorizer.c (vec_info::insert_on_entry): Implement.
(vec_info::insert_seq_on_entry): Likewise.
* tree-vect-stmts.c (vect_init_vector_1): Use
vec_info::insert_on_entry.
(vect_finish_stmt_generation): Set modified bit after
adjusting VUSE.
* tree-vect-slp.c (vect_create_constant_vectors): Simplify
by using vec_info::insert_seq_on_entry and bypassing
vec_init_vector.
(vect_schedule_slp_instance): Deal with all-constant
children later.
gcc/tree-vect-slp.c
gcc/tree-vect-stmts.c
gcc/tree-vectorizer.c
gcc/tree-vectorizer.h