Make more use of VECTOR_CST_ENCODED_ELT
commit0a2b1323a4d46d85c75d73778a7a78b42d750919
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Dec 2017 18:42:41 +0000 (7 18:42 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Dec 2017 18:42:41 +0000 (7 18:42 +0000)
tree7b1f2b8c0da2c3908d22d25dcea31ceacd492de2
parentc9672a9da31e7db93882933745bdaf7134d80979
Make more use of VECTOR_CST_ENCODED_ELT

This patch makes various bits of code operate directly on the new
VECTOR_CST encoding, instead of using VECTOR_CST_ELT on all elements
of the vector.

Previous patches handled operations that produce a new VECTOR_CST,
while this patch handles things like predicates.  It also makes
print_node dump the encoding instead of the full vector that
the encoding represents.

2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* tree-vector-builder.h
(tree_vector_builder::binary_encoded_nelts): Declare.
* tree-vector-builder.c
(tree_vector_builder::binary_encoded_nelts): New function.
* fold-const.c (negate_expr_p): Likewise.
(operand_equal_p, fold_checksum_tree): Likewise.
* tree-loop-distribution.c (const_with_all_bytes_same): Likewise.
* tree.c (integer_zerop, integer_onep, integer_all_onesp, real_zerop)
(real_onep, real_minus_onep, add_expr, initializer_zerop): Likewise.
(uniform_vector_p): Likewise.
* varasm.c (const_hash_1, compare_constant): Likewise.
* tree-ssa-ccp.c: Include tree-vector-builder.h.
(valid_lattice_transition): Operate directly on the VECTOR_CST
encoding.
* ipa-icf.c: Include tree-vector-builder.h.
(sem_variable::equals): Operate directly on the VECTOR_CST encoding.
* print-tree.c (print_node): Print encoding of VECTOR_CSTs.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255480 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/fold-const.c
gcc/ipa-icf.c
gcc/print-tree.c
gcc/tree-loop-distribution.c
gcc/tree-ssa-ccp.c
gcc/tree-vector-builder.c
gcc/tree-vector-builder.h
gcc/tree.c
gcc/varasm.c