Commit 1a4b99c1 by Richard Biener Committed by Richard Biener

tree-vectorizer.h (struct _slp_instance): Remove body_cost_vec member.

2015-05-28  Richard Biener  <rguenther@suse.de>

	* tree-vectorizer.h (struct _slp_instance): Remove body_cost_vec
	member.
	(SLP_INSTANCE_BODY_COST_VEC): Remove.
	(vect_update_slp_costs_according_to_vf): Likewise.
	(vect_slp_analyze_operations): Update prototype.
	* tree-vect-loop.c (vect_analyze_loop_2): Remove call to
	vect_update_slp_costs_according_to_vf, adjust.
	* tree-vect-slp.c (vect_free_slp_instance): Adjust.
	(vect_analyze_slp_cost_1): Likewise.
	(vect_analyze_slp_cost): Likewise.  Properly deal with
	widening reduction ops.  Commit body costs.
	(vect_analyze_slp_instance): Adjust.  Do not analyze SLP
	cost for loops from here.
	(vect_slp_analyze_operations): But do it from here when
	the vectorization factor is known and stmts are analyzed.
	(vect_bb_vectorization_profitable_p): Simplify.
	(vect_slp_analyze_bb_1): Do not compute SLP cost here.
	(vect_update_slp_costs_according_to_vf): Remove.

From-SVN: r223798
parent 428b3812
2015-05-28 Richard Biener <rguenther@suse.de>
* tree-vectorizer.h (struct _slp_instance): Remove body_cost_vec
member.
(SLP_INSTANCE_BODY_COST_VEC): Remove.
(vect_update_slp_costs_according_to_vf): Likewise.
(vect_slp_analyze_operations): Update prototype.
* tree-vect-loop.c (vect_analyze_loop_2): Remove call to
vect_update_slp_costs_according_to_vf, adjust.
* tree-vect-slp.c (vect_free_slp_instance): Adjust.
(vect_analyze_slp_cost_1): Likewise.
(vect_analyze_slp_cost): Likewise. Properly deal with
widening reduction ops. Commit body costs.
(vect_analyze_slp_instance): Adjust. Do not analyze SLP
cost for loops from here.
(vect_slp_analyze_operations): But do it from here when
the vectorization factor is known and stmts are analyzed.
(vect_bb_vectorization_profitable_p): Simplify.
(vect_slp_analyze_bb_1): Do not compute SLP cost here.
(vect_update_slp_costs_according_to_vf): Remove.
2015-05-27 Magnus Granberg <zorry@gentoo.org>
H.J. Lu <hongjiu.lu@intel.com>
......
......@@ -1814,15 +1814,12 @@ vect_analyze_loop_2 (loop_vec_info loop_vinfo)
/* Update the vectorization factor based on the SLP decision. */
vect_update_vf_for_slp (loop_vinfo);
/* Once VF is set, SLP costs should be updated since the number of
created vector stmts depends on VF. */
vect_update_slp_costs_according_to_vf (loop_vinfo);
/* Analyze operations in the SLP instances. Note this may
remove unsupported SLP instances which makes the above
SLP kind detection invalid. */
unsigned old_size = LOOP_VINFO_SLP_INSTANCES (loop_vinfo).length ();
vect_slp_analyze_operations (LOOP_VINFO_SLP_INSTANCES (loop_vinfo));
vect_slp_analyze_operations (LOOP_VINFO_SLP_INSTANCES (loop_vinfo),
LOOP_VINFO_TARGET_COST_DATA (loop_vinfo));
if (LOOP_VINFO_SLP_INSTANCES (loop_vinfo).length () != old_size)
return false;
}
......
......@@ -128,9 +128,6 @@ typedef struct _slp_instance {
/* The unrolling factor required to vectorized this SLP instance. */
unsigned int unrolling_factor;
/* Vectorization costs associated with SLP instance. */
stmt_vector_for_cost body_cost_vec;
/* The group of nodes that contain loads of this SLP instance. */
vec<slp_tree> loads;
} *slp_instance;
......@@ -140,7 +137,6 @@ typedef struct _slp_instance {
#define SLP_INSTANCE_TREE(S) (S)->root
#define SLP_INSTANCE_GROUP_SIZE(S) (S)->group_size
#define SLP_INSTANCE_UNROLLING_FACTOR(S) (S)->unrolling_factor
#define SLP_INSTANCE_BODY_COST_VEC(S) (S)->body_cost_vec
#define SLP_INSTANCE_LOADS(S) (S)->loads
#define SLP_TREE_CHILDREN(S) (S)->children
......@@ -1114,9 +1110,9 @@ extern void vect_free_slp_instance (slp_instance);
extern bool vect_transform_slp_perm_load (slp_tree, vec<tree> ,
gimple_stmt_iterator *, int,
slp_instance, bool);
extern bool vect_slp_analyze_operations (vec<slp_instance> slp_instances);
extern bool vect_slp_analyze_operations (vec<slp_instance> slp_instances,
void *);
extern bool vect_schedule_slp (loop_vec_info, bb_vec_info);
extern void vect_update_slp_costs_according_to_vf (loop_vec_info);
extern bool vect_analyze_slp (loop_vec_info, bb_vec_info, unsigned);
extern bool vect_make_slp_decision (loop_vec_info);
extern void vect_detect_hybrid_slp (loop_vec_info);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment