aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@linaro.org>2018-01-03 21:39:33 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2018-01-03 21:39:33 +0000
commit16c78b665aa4ce64af71b6ac7ebaa96c9807be4c (patch)
tree24617e60f1700c494a8be6af770f30443951f7f7 /gcc/cse.c
parent4bfb8e1143f4626e12df348a1bde34030c0fb2e7 (diff)
downloadgcc-16c78b665aa4ce64af71b6ac7ebaa96c9807be4c.zip
gcc-16c78b665aa4ce64af71b6ac7ebaa96c9807be4c.tar.gz
gcc-16c78b665aa4ce64af71b6ac7ebaa96c9807be4c.tar.bz2
Directly operate on CONST_VECTOR encoding
This patch makes some pieces of code operate directly on the new CONST_VECTOR encoding. 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org> gcc/ * cse.c (hash_rtx_cb): Hash only the encoded elements. * cselib.c (cselib_hash_rtx): Likewise. * expmed.c (make_tree): Build VECTOR_CSTs directly from the CONST_VECTOR encoding. From-SVN: r256192
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index 81a4015..fcfbba0 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -2353,11 +2353,11 @@ hash_rtx_cb (const_rtx x, machine_mode mode,
int units;
rtx elt;
- units = CONST_VECTOR_NUNITS (x);
+ units = const_vector_encoded_nelts (x);
for (i = 0; i < units; ++i)
{
- elt = CONST_VECTOR_ELT (x, i);
+ elt = CONST_VECTOR_ENCODED_ELT (x, i);
hash += hash_rtx_cb (elt, GET_MODE (elt),
do_not_record_p, hash_arg_in_memory_p,
have_reg_qty, cb);