Move gimplify_buildN API local to only remaining user
authorRichard Biener <rguenther@suse.de>
Thu, 15 Apr 2021 11:03:21 +0000 (13:03 +0200)
committerRichard Biener <rguenther@suse.de>
Mon, 26 Apr 2021 09:04:00 +0000 (11:04 +0200)
commitb972e036f40c12b106f9070c3e8adea0eb8a45fa
treec7ea13fc150948db248df196e567eac1c4ddd729
parent152334cfb7a17bb3f1356f31a2e808d3ee459605
Move gimplify_buildN API local to only remaining user

This moves the legacy gimplify_buildN API to tree-vect-generic.c,
its only user and elides the gimplification step, making it a wrapper
around gimple_build, adjusting tree_vec_extract for this.

I've noticed that vector CTOR expansion doesn't deal with unfolded
{} and thus this makes it more resilent.  I've also adjusted the
match.pd vector CTOR extraction code to make sure it doesn't
produce a CTOR when folding would make it a vector constant.

2021-04-15  Richard Biener  <rguenther@suse.de>

* tree-cfg.h (gimplify_build1): Remove.
(gimplify_build2): Likewise.
(gimplify_build3): Likewise.
* tree-cfg.c (gimplify_build1): Move to tree-vect-generic.c.
(gimplify_build2): Likewise.
(gimplify_build3): Likewise.
* tree-vect-generic.c (gimplify_build1): Move from tree-cfg.c.
Modernize.
(gimplify_build2): Likewise.
(gimplify_build3): Likewise.
(tree_vec_extract): Use resimplify with following SSA edges.
(expand_vector_parallel): Avoid passing NULL size/bitpos
to tree_vec_extract.
* expr.c (store_constructor): Deal with zero-element CTORs.
* match.pd (bit_field_ref <vector CTOR>): Make sure to
produce vector constants when possible.
gcc/expr.c
gcc/match.pd
gcc/tree-cfg.c
gcc/tree-cfg.h
gcc/tree-vect-generic.c