summaryrefslogtreecommitdiff
path: root/gcc/Makefile.in
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2018-01-02 18:27:50 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2018-01-02 18:27:50 +0000
commita80726d17beb97cddd8e2c9f53520fac9ff190b4 (patch)
tree6a597b75586e86b045125cf698b9b23ec15e2d4a /gcc/Makefile.in
parent96fce54f18bbc91af97c2b8ce63bde1fbe96644b (diff)
New CONST_VECTOR layout
This patch makes CONST_VECTOR use the same encoding as VECTOR_CST. One problem that occurs in RTL but not at the tree level is that a fair amount of code uses XVEC and XVECEXP directly on CONST_VECTORs (which is valid, just with looser checking). This is complicated by the fact that vectors are also represented as PARALLELs in some target interfaces, so using XVECEXP is a good polymorphic way of handling both forms. Rather than try to untangle all that, the best approach seemed to be to continue to encode every element in a fixed-length vector. That way only target-independent and AArch64 code need to be precise about using CONST_VECTOR_ELT over XVECEXP. After this change is no longer valid to modify CONST_VECTORs in-place. This needed some fix-up in the powerpc backends. 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org> gcc/ * doc/rtl.texi (const_vector): Describe new encoding scheme. * Makefile.in (OBJS): Add rtx-vector-builder.o. * rtx-vector-builder.h: New file. * rtx-vector-builder.c: Likewise. * rtl.h (rtx_def::u2): Add a const_vector field. (CONST_VECTOR_NPATTERNS): New macro. (CONST_VECTOR_NELTS_PER_PATTERN): Likewise. (CONST_VECTOR_DUPLICATE_P): Likewise. (CONST_VECTOR_STEPPED_P): Likewise. (CONST_VECTOR_ENCODED_ELT): Likewise. (const_vec_duplicate_p): Check for a duplicated vector encoding. (unwrap_const_vec_duplicate): Likewise. (const_vec_series_p): Check for a non-duplicated vector encoding. Say that the function only returns true for integer vectors. * emit-rtl.c: Include rtx-vector-builder.h. (gen_const_vec_duplicate_1): Delete. (gen_const_vector): Call gen_const_vec_duplicate instead of gen_const_vec_duplicate_1. (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding. (gen_const_vec_duplicate): Use rtx_vector_builder. (gen_const_vec_series): Likewise. (gen_rtx_CONST_VECTOR): Likewise. * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h. (swap_const_vector_halves): Take an rtx pointer rather than rtx. Build a new vector rather than modifying a CONST_VECTOR in-place. (handle_special_swappables): Update call accordingly. * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h. (swap_const_vector_halves): Take an rtx pointer rather than rtx. Build a new vector rather than modifying a CONST_VECTOR in-place. (handle_special_swappables): Update call accordingly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@256102 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/Makefile.in')
-rw-r--r--gcc/Makefile.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 3b0ba2769519..a1af00322a67 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1453,6 +1453,7 @@ OBJS = \
rtlhash.o \
rtlanal.o \
rtlhooks.o \
+ rtx-vector-builder.o \
run-rtl-passes.o \
sched-deps.o \
sched-ebb.o \