This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] [2/2] Support reduction in loop SLP


This part adds the actual code for reduction support.

Bootstrapped and tested on powerpc64-suse-linux.
I am planning to apply it later today.

Ira

ChangeLog:

	PR tree-optimization/41881
	* tree-vectorizer.h (struct _loop_vec_info): Add new field
reduction_chains along with a macro for
	its access.
	* tree-vect-loop.c (new_loop_vec_info): Initialize reduction chains.
	(destroy_loop_vec_info): Free reduction chains.
	(vect_analyze_loop_2): Return false if vect_analyze_slp() returns false.
	(vect_is_slp_reduction): New function.
	(vect_is_simple_reduction_1): Call vect_is_slp_reduction.
	(vect_create_epilog_for_reduction): Support SLP reduction chains.
	* tree-vect-slp.c (vect_get_and_check_slp_defs): Allow different
definition types for reduction
	chains.
	(vect_supported_load_permutation_p): Don't allow permutations for
reduction chains.
	(vect_analyze_slp_instance): Support reduction chains.
	(vect_analyze_slp): Try to build SLP instance from reduction chains.
	(vect_get_constant_vectors):  Handle reduction chains.
	(vect_schedule_slp_instance): Mark the first statement of the
reduction chain as reduction.
	
testsuite/ChangeLog:

	PR tree-optimization/41881
	* gcc.dg/vect/O3-pr41881.c: New test.
	* gcc.dg/vect/O3-slp-reduc-10.c: New test.

Attachment: slp-reduc.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]