Add an empty constructor shortcut to build_vector_from_ctor
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 18 Nov 2019 15:29:53 +0000 (15:29 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 18 Nov 2019 15:29:53 +0000 (15:29 +0000)
commit78930e4b4867c0558cf347778591a67a0b235ca0
tree06c6bc2d446aa1379fcca92decf227ccf6da7351
parentcb77875a86c67f606ff59261348e1d81b945aa44
Add an empty constructor shortcut to build_vector_from_ctor

Empty vector constructors are equivalent to zero vectors.  If we handle
that case directly, we can support it for variable-length vectors and
can hopefully make things more efficient for fixed-length vectors.

This is needed by a later C++ patch.

2019-11-18  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree.c (build_vector_from_ctor): Directly return a zero vector for
empty constructors.

From-SVN: r278413
gcc/ChangeLog
gcc/tree.c