mbox series

[00/10] vect: Move costing next to the transform for vect store

Message ID cover.1694657494.git.linkw@linux.ibm.com
Headers show
Series vect: Move costing next to the transform for vect store | expand

Message

Kewen.Lin Sept. 14, 2023, 3:11 a.m. UTC
This patch series is a follow up for the previous patch
series for vector load [1].  Some of associated test cases
show the benefits of this kind of structuring.  Like the
one on vect load, this patch series makes costing not call
function vect_model_store_cost any more but next to the
transform.

Most of them are organized according to the memory access
types of vector store, hope it can make the review and
bisection easy.  The changes just follow the handlings in
the function vect_model_store_cost first, then refine a bit
by referring to the transform code, I also checked them
with some typical test cases to verify.

The whole series can be bootstrapped and regtested
incrementally on:
  - x86_64-redhat-linux
  - aarch64-linux-gnu
  - powerpc64-linux-gnu P7, P8 and P9
  - powerpc64le-linux-gnu P8, P9 and P10

By considering the current vector test buckets are mainly
tested without cost model, I also verified the whole patch
series was neutral for SPEC2017 int/fp on Power9 at O2,
O3 and Ofast separately.

[1] https://gcc.gnu.org/pipermail/gcc-patches/2023-June/621460.html

Kewen Lin (10):
  vect: Ensure vect store is supported for some VMAT_ELEMENTWISE case
  vect: Move vect_model_store_cost next to the transform in vectorizable_store
  vect: Adjust vectorizable_store costing on VMAT_GATHER_SCATTER
  vect: Simplify costing on vectorizable_scan_store
  vect: Adjust vectorizable_store costing on VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
  vect: Adjust vectorizable_store costing on VMAT_LOAD_STORE_LANES
  vect: Adjust vectorizable_store costing on VMAT_CONTIGUOUS_PERMUTE
  aarch64: Don't use CEIL for vector_store in aarch64_stp_sequence_cost
  vect: Get rid of vect_model_store_cost
  vect: Consider vec_perm costing for VMAT_CONTIGUOUS_REVERSE

 gcc/config/aarch64/aarch64.cc                 |   2 +-
 .../costmodel/ppc/costmodel-vect-store-1.c    |  23 +
 .../costmodel/ppc/costmodel-vect-store-2.c    |  29 +
 gcc/tree-vect-stmts.cc                        | 717 +++++++++++-------
 4 files changed, 493 insertions(+), 278 deletions(-)
 create mode 100644 gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-store-1.c
 create mode 100644 gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-store-2.c