From e9dbe7bb252efef01651d46da119afcdea78a301 Mon Sep 17 00:00:00 2001 From: Ira Rosen Date: Mon, 1 Jun 2009 08:15:01 +0000 Subject: re PR tree-optimization/39129 (The meaning of 'BB' in "too many BBs in loop") PR tree-optimization/39129 * tree-vect-loop-manip.c (conservative_cost_threshold): Change the printed message. (vect_do_peeling_for_loop_bound): Use LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT and LOOP_REQUIRES_VERSIONING_FOR_ALIAS macros. (vect_loop_versioning): Likewise. (vect_create_cond_for_alias_checks): Fix indentation. * tree-vectorizer.h (struct _loop_vec_info): Fix indentation of the macros. (LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT): Define. (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Likewise. * tree-vect-loop.c (vect_analyze_loop_form): Change "too many BBs" to "control flow in loop". (vect_estimate_min_profitable_iters): Use LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT and LOOP_REQUIRES_VERSIONING_FOR_ALIAS macros. * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise. (vect_create_data_ref_ptr): Don't mention array dimension in printing. * tree-vect-stmts.c (vectorizable_store): Replace the check that the statement belongs to a group of strided accesses with the exact code check. (vectorizable_load): Likewise. * tree-vect-slp.c (vect_analyze_slp_instance): Spell out "basic block". (vect_slp_analyze_bb, vect_slp_transform_bb): Likewise. From-SVN: r148036 --- gcc/tree-vectorizer.h | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) (limited to 'gcc/tree-vectorizer.h') diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 0a8e53c..c78e768 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -239,33 +239,38 @@ typedef struct _loop_vec_info { } *loop_vec_info; /* Access Functions. */ -#define LOOP_VINFO_LOOP(L) (L)->loop -#define LOOP_VINFO_BBS(L) (L)->bbs -#define LOOP_VINFO_NITERS(L) (L)->num_iters +#define LOOP_VINFO_LOOP(L) (L)->loop +#define LOOP_VINFO_BBS(L) (L)->bbs +#define LOOP_VINFO_NITERS(L) (L)->num_iters /* Since LOOP_VINFO_NITERS can change after prologue peeling retain total unchanged scalar loop iterations for cost model. */ -#define LOOP_VINFO_NITERS_UNCHANGED(L) (L)->num_iters_unchanged -#define LOOP_VINFO_COST_MODEL_MIN_ITERS(L) (L)->min_profitable_iters -#define LOOP_VINFO_VECTORIZABLE_P(L) (L)->vectorizable -#define LOOP_VINFO_VECT_FACTOR(L) (L)->vectorization_factor -#define LOOP_VINFO_PTR_MASK(L) (L)->ptr_mask -#define LOOP_VINFO_DATAREFS(L) (L)->datarefs -#define LOOP_VINFO_DDRS(L) (L)->ddrs -#define LOOP_VINFO_INT_NITERS(L) (TREE_INT_CST_LOW ((L)->num_iters)) -#define LOOP_PEELING_FOR_ALIGNMENT(L) (L)->peeling_for_alignment -#define LOOP_VINFO_UNALIGNED_DR(L) (L)->unaligned_dr -#define LOOP_VINFO_MAY_MISALIGN_STMTS(L) (L)->may_misalign_stmts -#define LOOP_VINFO_LOC(L) (L)->loop_line_number -#define LOOP_VINFO_MAY_ALIAS_DDRS(L) (L)->may_alias_ddrs -#define LOOP_VINFO_STRIDED_STORES(L) (L)->strided_stores -#define LOOP_VINFO_SLP_INSTANCES(L) (L)->slp_instances +#define LOOP_VINFO_NITERS_UNCHANGED(L) (L)->num_iters_unchanged +#define LOOP_VINFO_COST_MODEL_MIN_ITERS(L) (L)->min_profitable_iters +#define LOOP_VINFO_VECTORIZABLE_P(L) (L)->vectorizable +#define LOOP_VINFO_VECT_FACTOR(L) (L)->vectorization_factor +#define LOOP_VINFO_PTR_MASK(L) (L)->ptr_mask +#define LOOP_VINFO_DATAREFS(L) (L)->datarefs +#define LOOP_VINFO_DDRS(L) (L)->ddrs +#define LOOP_VINFO_INT_NITERS(L) (TREE_INT_CST_LOW ((L)->num_iters)) +#define LOOP_PEELING_FOR_ALIGNMENT(L) (L)->peeling_for_alignment +#define LOOP_VINFO_UNALIGNED_DR(L) (L)->unaligned_dr +#define LOOP_VINFO_MAY_MISALIGN_STMTS(L) (L)->may_misalign_stmts +#define LOOP_VINFO_LOC(L) (L)->loop_line_number +#define LOOP_VINFO_MAY_ALIAS_DDRS(L) (L)->may_alias_ddrs +#define LOOP_VINFO_STRIDED_STORES(L) (L)->strided_stores +#define LOOP_VINFO_SLP_INSTANCES(L) (L)->slp_instances #define LOOP_VINFO_SLP_UNROLLING_FACTOR(L) (L)->slp_unrolling_factor +#define LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT(L) \ +VEC_length (gimple, (L)->may_misalign_stmts) > 0 +#define LOOP_REQUIRES_VERSIONING_FOR_ALIAS(L) \ +VEC_length (ddr_p, (L)->may_alias_ddrs) > 0 + #define NITERS_KNOWN_P(n) \ (host_integerp ((n),0) \ && TREE_INT_CST_LOW ((n)) > 0) -#define LOOP_VINFO_NITERS_KNOWN_P(L) \ +#define LOOP_VINFO_NITERS_KNOWN_P(L) \ NITERS_KNOWN_P((L)->num_iters) static inline loop_vec_info -- cgit v1.1