r236642 - in /trunk/gcc: ChangeLog tree-vect-lo...

rsandifo@gcc.gnu.org rsandifo@gcc.gnu.org
Tue May 24 14:05:00 GMT 2016


Author: rsandifo
Date: Tue May 24 14:05:20 2016
New Revision: 236642

URL: https://gcc.gnu.org/viewcvs?rev=236642&root=gcc&view=rev
Log:
Clean up PURE_SLP_STMT handling

The vectorizable_* routines had many instances of:

        slp_node || PURE_SLP_STMT (stmt_info)

which gives the misleading impression that we can have
!slp_node && PURE_SLP_STMT (stmt_info).  In this context
it's really enough to test slp_node on its own.

There are three cases:

      loop vectorisation only:
        vectorizable_foo called only with !slp_node

      pure SLP:
        vectorizable_foo called only with slp_node

      hybrid SLP:
        (e.g. a vector that's used in SLP statements and also in a reduction)
        - vectorizable_foo called once with slp_node for the SLP uses.
        - vectorizable_foo called once with !slp_node for the non-SLP uses.

Hybrid SLP isn't possible for stores, so I added an explicit assert
for that.

I also made vectorizable_comparison static, to make it obvious that
no other callers outside tree-vect-stmts.c could use it with the
!slp && PURE_SLP_STMT combination.

Tested on aarch64-linux-gnu and x86_64-linux-gnu.

gcc/
	* tree-vectorizer.h (vectorizable_comparison): Delete.
	* tree-vect-loop.c (vectorizable_reduction): Remove redundant
	PURE_SLP_STMT check.
	* tree-vect-stmts.c (vectorizable_call): Likewise.
	(vectorizable_simd_clone_call): Likewise.
	(vectorizable_conversion): Likewise.
	(vectorizable_assignment): Likewise.
	(vectorizable_shift): Likewise.
	(vectorizable_operation): Likewise.
	(vectorizable_load): Likewise.
	(vectorizable_condition): Likewise.
	(vectorizable_store): Likewise.  Assert that we don't have
	hybrid SLP.
	(vectorizable_comparison): Make static.  Remove redundant
	PURE_SLP_STMT check.
	(vect_transform_stmt): Assert that we always have an slp_node
	if PURE_SLP_STMT.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-vect-loop.c
    trunk/gcc/tree-vect-stmts.c
    trunk/gcc/tree-vectorizer.h



More information about the Gcc-cvs mailing list