Go to file
Richard Biener 6390c5047a Allow different vector types for stmt groups
This allows vectorization (in practice non-loop vectorization) to
have a stmt participate in different vector type vectorizations.
It allows us to remove vect_update_shared_vectype and replace it
by pushing/popping STMT_VINFO_VECTYPE from SLP_TREE_VECTYPE around
vect_analyze_stmt and vect_transform_stmt.

For data-ref the situation is a bit more complicated since we
analyze alignment info with a specific vector type in mind which
doesn't play well when that changes.

So the bulk of the change is passing down the actual vector type
used for a vectorized access to the various accessors of alignment
info, first and foremost dr_misalignment but also aligned_access_p,
known_alignment_for_access_p, vect_known_alignment_in_bytes and
vect_supportable_dr_alignment.  I took the liberty to replace
ALL_CAPS macro accessors with the lower-case function invocations.

The actual changes to the behavior are in dr_misalignment which now
is the place factoring in the negative step adjustment as well as
handling alignment queries for a vector type with bigger alignment
requirements than what we can (or have) analyze(d).

vect_slp_analyze_node_alignment makes use of this and upon receiving
a vector type with a bigger alingment desire re-analyzes the DR
with respect to it but keeps an older more precise result if possible.
In this context it might be possible to do the analysis just once
but instead of analyzing with respect to a specific desired alignment
look for the biggest alignment we can compute a not unknown alignment.

The ChangeLog includes the functional changes but not the bulk due
to the alignment accessor API changes - I hope that's something good.

2021-09-17  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/97351
	PR tree-optimization/97352
	PR tree-optimization/82426
	* tree-vectorizer.h (dr_misalignment): Add vector type
	argument.
	(aligned_access_p): Likewise.
	(known_alignment_for_access_p): Likewise.
	(vect_supportable_dr_alignment): Likewise.
	(vect_known_alignment_in_bytes): Likewise.  Refactor.
	(DR_MISALIGNMENT): Remove.
	(vect_update_shared_vectype): Likewise.
	* tree-vect-data-refs.c (dr_misalignment): Refactor, handle
	a vector type with larger alignment requirement and apply
	the negative step adjustment here.
	(vect_calculate_target_alignment): Remove.
	(vect_compute_data_ref_alignment): Get explicit vector type
	argument, do not apply a negative step alignment adjustment
	here.
	(vect_slp_analyze_node_alignment): Re-analyze alignment
	when we re-visit the DR with a bigger desired alignment but
	keep more precise results from smaller alignments.
	* tree-vect-slp.c (vect_update_shared_vectype): Remove.
	(vect_slp_analyze_node_operations_1): Do not update the
	shared vector type on stmts.
	* tree-vect-stmts.c (vect_analyze_stmt): Push/pop the
	vector type of an SLP node to the representative stmt-info.
	(vect_transform_stmt): Likewise.

	* gcc.target/i386/vect-pr82426.c: New testcase.
	* gcc.target/i386/vect-pr97352.c: Likewise.
2021-09-27 10:24:12 +02:00
c++tools
config Daily bump. 2021-09-20 00:16:21 +00:00
contrib Daily bump. 2021-09-21 00:16:31 +00:00
fixincludes
gcc Allow different vector types for stmt groups 2021-09-27 10:24:12 +02:00
gnattools
gotools Daily bump. 2021-09-22 00:16:28 +00:00
include Daily bump. 2021-09-23 00:16:29 +00:00
INSTALL
intl
libada
libatomic
libbacktrace
libcc1
libcody
libcpp
libdecnumber
libffi
libgcc Daily bump. 2021-09-23 00:16:29 +00:00
libgfortran Daily bump. 2021-09-27 00:16:16 +00:00
libgo runtime: set runtime.GOROOT value at build time 2021-09-21 14:31:10 -07:00
libgomp Daily bump. 2021-09-23 00:16:29 +00:00
libiberty Daily bump. 2021-09-24 00:16:23 +00:00
libitm
libobjc
liboffloadmic
libphobos
libquadmath
libsanitizer
libssp
libstdc++-v3 Daily bump. 2021-09-25 00:16:20 +00:00
libvtv
lto-plugin
maintainer-scripts
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2021-09-25 00:16:20 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS MAINTAINERS: add myself as Fortran reviewer 2021-09-20 22:16:18 +02:00
Makefile.def top-level: merge Makefile.def patches from binutils-gdb repository 2021-09-24 18:16:55 +01:00
Makefile.in top-level: merge Makefile.def patches from binutils-gdb repository 2021-09-24 18:16:55 +01:00
Makefile.tpl
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
README
symlink-tree
test-driver
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.