diff options
author | Devang Patel <dpatel@apple.com> | 2005-07-05 19:25:08 -0700 |
---|---|---|
committer | Devang Patel <dpatel@gcc.gnu.org> | 2005-07-05 19:25:08 -0700 |
commit | 00518cb11760cbc6b2827727116c28a12e2558cc (patch) | |
tree | 874a2a62d26727eb826bc1a7e13e221fb23d3a00 /gcc | |
parent | 51076f9604483f4f1b4dc16a90871384c1fd15cc (diff) | |
download | gcc-00518cb11760cbc6b2827727116c28a12e2558cc.zip gcc-00518cb11760cbc6b2827727116c28a12e2558cc.tar.gz gcc-00518cb11760cbc6b2827727116c28a12e2558cc.tar.bz2 |
tree-vectorizer.h (struct _loop_vec_info): Remove loop_line_number.
* tree-vectorizer.h (struct _loop_vec_info): Remove loop_line_number.
(LOOP_VINFO_LOC, LOOP_LOC): Remove.
* tree-vectorizer.c (vect_loop_location): New.
(vect_print_dump_info): Use vect_loop_location.
(new_loop_vec_info): Do not set LOOP_VINFO_LOC.
(vectorize_loops): Set vect_loop_location.
* tree-vect-analyze.c (vect_analyze_offset_expr,
vect_determin_vectorization_factor, vect_analyze_operations,
vect_analyze_scalar_cycles, vect_analyze_data_ref_dependence,
vect_analyze_data_ref_dependences, vect_compute_data_ref_alignment,
vect_analyze_data_refs_alignment, vect_analyze_data_ref_access,
vect_analyze_data_ref_accesses, vect_analyze_pointer_ref_access,
vect_object_analysis, vect_analyze_data_refs, vect_mark_relevant,
vect_stmt_relevant_p, vect_mark_stmts_to_be_vectorized,
vect_can_advance_ivs_p, vect_get_loop_niters, vect_analyze_loop_form,
vect_analyze_loop): Adjust vect_print_dump_info API.
* tree-vect-transform.c (vect_create_addr_base_for_vector_ref,
vect_create_data_ref_ptr, vect_init_vector, vect_get_vec_def_for_operand,
vect_finish_stmt_generation, vectorizable_assignment,
vectorizable_operation, vectorizable_store, vectorizable_load,
vectorizable_live_operation, vectorizable_condition, vect_transform_stmt,
vect_update_ivs_after_vectorizer, vect_do_peeling_for_loop_bound,
vect_gen_ninters_for_prolog_loop, vect_do_peeling_for_alignment,
vect_transform_loop): Same.
* tree-vectorizer.c (get_vectype_for_scalar_type, vect_is_simple_use,
vect_is_simple_reduction, vect_is_simple_iv_evolution, vectorize_loops):
Same.
From-SVN: r101649
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 30 | ||||
-rw-r--r-- | gcc/tree-vect-analyze.c | 278 | ||||
-rw-r--r-- | gcc/tree-vect-transform.c | 114 | ||||
-rw-r--r-- | gcc/tree-vectorizer.c | 70 | ||||
-rw-r--r-- | gcc/tree-vectorizer.h | 8 |
5 files changed, 246 insertions, 254 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d398a7f..f78cfdb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,33 @@ +2005-07-05 Devang Patel <dpatel@apple.com> + + * tree-vectorizer.h (struct _loop_vec_info): Remove loop_line_number. + (LOOP_VINFO_LOC, LOOP_LOC): Remove. + * tree-vectorizer.c (vect_loop_location): New. + (vect_print_dump_info): Use vect_loop_location. + (new_loop_vec_info): Do not set LOOP_VINFO_LOC. + (vectorize_loops): Set vect_loop_location. + * tree-vect-analyze.c (vect_analyze_offset_expr, + vect_determin_vectorization_factor, vect_analyze_operations, + vect_analyze_scalar_cycles, vect_analyze_data_ref_dependence, + vect_analyze_data_ref_dependences, vect_compute_data_ref_alignment, + vect_analyze_data_refs_alignment, vect_analyze_data_ref_access, + vect_analyze_data_ref_accesses, vect_analyze_pointer_ref_access, + vect_object_analysis, vect_analyze_data_refs, vect_mark_relevant, + vect_stmt_relevant_p, vect_mark_stmts_to_be_vectorized, + vect_can_advance_ivs_p, vect_get_loop_niters, vect_analyze_loop_form, + vect_analyze_loop): Adjust vect_print_dump_info API. + * tree-vect-transform.c (vect_create_addr_base_for_vector_ref, + vect_create_data_ref_ptr, vect_init_vector, vect_get_vec_def_for_operand, + vect_finish_stmt_generation, vectorizable_assignment, + vectorizable_operation, vectorizable_store, vectorizable_load, + vectorizable_live_operation, vectorizable_condition, vect_transform_stmt, + vect_update_ivs_after_vectorizer, vect_do_peeling_for_loop_bound, + vect_gen_ninters_for_prolog_loop, vect_do_peeling_for_alignment, + vect_transform_loop): Same. + * tree-vectorizer.c (get_vectype_for_scalar_type, vect_is_simple_use, + vect_is_simple_reduction, vect_is_simple_iv_evolution, vectorize_loops): + Same. + 2005-07-05 Randolph Chung <tausq@debian.org> * configure.ac (hppa*-*-linux*: Check for a TLS capable gas. diff --git a/gcc/tree-vect-analyze.c b/gcc/tree-vect-analyze.c index f37b731..267a6ff 100644 --- a/gcc/tree-vect-analyze.c +++ b/gcc/tree-vect-analyze.c @@ -200,7 +200,7 @@ vect_analyze_offset_expr (tree expr, if (!BINARY_CLASS_P (expr)) { /* We expect to get binary expressions (PLUS/MINUS and MULT). */ - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "Not binary expression "); print_generic_expr (vect_dump, expr, TDF_SLIM); @@ -322,7 +322,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) int i; tree scalar_type; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "=== vect_determine_vectorization_factor ==="); for (i = 0; i < nbbs; i++) @@ -336,7 +336,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) stmt_vec_info stmt_info = vinfo_for_stmt (stmt); tree vectype; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "==> examining statement: "); print_generic_expr (vect_dump, stmt, TDF_SLIM); @@ -347,15 +347,14 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) if (!STMT_VINFO_RELEVANT_P (stmt_info) && !STMT_VINFO_LIVE_P (stmt_info)) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "skip."); continue; } if (VECTOR_MODE_P (TYPE_MODE (TREE_TYPE (stmt)))) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) { fprintf (vect_dump, "not vectorized: vector stmt in loop:"); print_generic_expr (vect_dump, stmt, TDF_SLIM); @@ -370,7 +369,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) else scalar_type = TREE_TYPE (stmt); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "get vectype for scalar type: "); print_generic_expr (vect_dump, scalar_type, TDF_SLIM); @@ -379,15 +378,14 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) vectype = get_vectype_for_scalar_type (scalar_type); if (!vectype) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) { fprintf (vect_dump, "not vectorized: unsupported data-type "); print_generic_expr (vect_dump, scalar_type, TDF_SLIM); } return false; } - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "vectype: "); print_generic_expr (vect_dump, vectype, TDF_SLIM); @@ -395,7 +393,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) STMT_VINFO_VECTYPE (stmt_info) = vectype; nunits = TYPE_VECTOR_SUBPARTS (vectype); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "nunits = %d", nunits); if (vectorization_factor) @@ -404,8 +402,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) This restriction will be relaxed in the future. */ if (nunits != vectorization_factor) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: mixed data-types"); return false; } @@ -422,8 +419,7 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo) if (vectorization_factor <= 1) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: unsupported data-type"); return false; } @@ -451,7 +447,7 @@ vect_analyze_operations (loop_vec_info loop_vinfo) stmt_vec_info stmt_info; bool need_to_vectorize = false; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "=== vect_analyze_operations ==="); gcc_assert (LOOP_VINFO_VECT_FACTOR (loop_vinfo)); @@ -464,7 +460,7 @@ vect_analyze_operations (loop_vec_info loop_vinfo) for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi)) { stmt_info = vinfo_for_stmt (phi); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "examining phi: "); print_generic_expr (vect_dump, phi, TDF_SLIM); @@ -475,8 +471,7 @@ vect_analyze_operations (loop_vec_info loop_vinfo) if (STMT_VINFO_LIVE_P (stmt_info)) { /* FORNOW: not yet supported. */ - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: value used after loop."); return false; } @@ -485,8 +480,7 @@ vect_analyze_operations (loop_vec_info loop_vinfo) { /* Most likely a reduction-like computation that is used in the loop. */ - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: unsupported pattern."); return false; } @@ -497,7 +491,7 @@ vect_analyze_operations (loop_vec_info loop_vinfo) tree stmt = bsi_stmt (si); stmt_vec_info stmt_info = vinfo_for_stmt (stmt); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "==> examining statement: "); print_generic_expr (vect_dump, stmt, TDF_SLIM); @@ -515,7 +509,7 @@ vect_analyze_operations (loop_vec_info loop_vinfo) if (!STMT_VINFO_RELEVANT_P (stmt_info) && !STMT_VINFO_LIVE_P (stmt_info)) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "irrelevant."); continue; } @@ -533,8 +527,7 @@ vect_analyze_operations (loop_vec_info loop_vinfo) if (!ok) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) { fprintf (vect_dump, "not vectorized: relevant stmt not supported: "); @@ -556,8 +549,7 @@ vect_analyze_operations (loop_vec_info loop_vinfo) if (!ok) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) { fprintf (vect_dump, "not vectorized: live stmt not supported: "); @@ -578,18 +570,17 @@ vect_analyze_operations (loop_vec_info loop_vinfo) touching this loop. */ if (!need_to_vectorize) { - if (vect_print_dump_info (REPORT_DETAILS, LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "All the computation can be taken out of the loop."); - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: redundant loop. no profit to vectorize."); return false; } if (LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo) - && vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + && vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "vectorization_factor = %d, niters = " HOST_WIDE_INT_PRINT_DEC, vectorization_factor, LOOP_VINFO_INT_NITERS (loop_vinfo)); @@ -597,8 +588,7 @@ vect_analyze_operations (loop_vec_info loop_vinfo) if (LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo) && LOOP_VINFO_INT_NITERS (loop_vinfo) < vectorization_factor) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: iteration count too small."); return false; } @@ -606,20 +596,18 @@ vect_analyze_operations (loop_vec_info loop_vinfo) if (!LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo) || LOOP_VINFO_INT_NITERS (loop_vinfo) % vectorization_factor != 0) { - if (vect_print_dump_info (REPORT_DETAILS, LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "epilog loop required."); if (!vect_can_advance_ivs_p (loop_vinfo)) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: can't create epilog loop 1."); return false; } if (!slpeel_can_duplicate_loop_p (loop, loop->single_exit)) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: can't create epilog loop 2."); return false; @@ -722,7 +710,7 @@ vect_analyze_scalar_cycles (loop_vec_info loop_vinfo) basic_block bb = loop->header; tree dummy; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "=== vect_analyze_scalar_cycles ==="); for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi)) @@ -732,7 +720,7 @@ vect_analyze_scalar_cycles (loop_vec_info loop_vinfo) stmt_vec_info stmt_vinfo = vinfo_for_stmt (phi); tree reduc_stmt; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "Analyze phi: "); print_generic_expr (vect_dump, phi, TDF_SLIM); @@ -743,7 +731,7 @@ vect_analyze_scalar_cycles (loop_vec_info loop_vinfo) if (!is_gimple_reg (SSA_NAME_VAR (def))) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "virtual phi. skip."); continue; } @@ -757,8 +745,7 @@ vect_analyze_scalar_cycles (loop_vec_info loop_vinfo) if (!access_fn) continue; - if (vect_print_dump_info (REPORT_DETAILS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "Access function of PHI: "); print_generic_expr (vect_dump, access_fn, TDF_SLIM); @@ -766,7 +753,7 @@ vect_analyze_scalar_cycles (loop_vec_info loop_vinfo) if (vect_is_simple_iv_evolution (loop->num, access_fn, &dummy, &dummy)) { - if (vect_print_dump_info (REPORT_DETAILS,LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "Detected induction."); STMT_VINFO_DEF_TYPE (stmt_vinfo) = vect_induction_def; continue; @@ -777,14 +764,14 @@ vect_analyze_scalar_cycles (loop_vec_info loop_vinfo) reduc_stmt = vect_is_simple_reduction (loop, phi); if (reduc_stmt) { - if (vect_print_dump_info (REPORT_DETAILS, LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "Detected reduction."); STMT_VINFO_DEF_TYPE (stmt_vinfo) = vect_reduction_def; STMT_VINFO_DEF_TYPE (vinfo_for_stmt (reduc_stmt)) = vect_reduction_def; } else - if (vect_print_dump_info (REPORT_DETAILS, LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "Unknown def-use cycle pattern."); } @@ -869,8 +856,7 @@ vect_analyze_data_ref_dependence (struct data_reference *dra, if (!vect_base_addr_differ_p (dra, drb, &differ_p)) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) { fprintf (vect_dump, "not vectorized: can't determine dependence between: "); @@ -892,8 +878,7 @@ vect_analyze_data_ref_dependence (struct data_reference *dra, if (DDR_ARE_DEPENDENT (ddr) == chrec_dont_know) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) { fprintf (vect_dump, "not vectorized: can't determine dependence between "); @@ -922,8 +907,7 @@ vect_analyze_data_ref_dependence (struct data_reference *dra, if (!DDR_DIST_VECT (ddr)) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) { fprintf (vect_dump, "not vectorized: bad dist vector for "); print_generic_expr (vect_dump, DR_REF (dra), TDF_SLIM); @@ -941,7 +925,7 @@ vect_analyze_data_ref_dependence (struct data_reference *dra, /* Two references with distance zero have the same alignment. */ VEC_safe_push (dr_p, heap, STMT_VINFO_SAME_ALIGN_REFS (stmtinfo_a), drb); VEC_safe_push (dr_p, heap, STMT_VINFO_SAME_ALIGN_REFS (stmtinfo_b), dra); - if (vect_print_dump_info (REPORT_ALIGNMENT, LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_ALIGNMENT)) fprintf (vect_dump, "accesses have the same alignment."); return false; } @@ -951,8 +935,7 @@ vect_analyze_data_ref_dependence (struct data_reference *dra, is concerned, in this case. */ return false; - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) { fprintf (vect_dump, "not vectorized: possible dependence between data-refs "); @@ -979,10 +962,10 @@ vect_analyze_data_ref_dependences (loop_vec_info loop_vinfo) /* Examine store-store (output) dependences. */ - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "=== vect_analyze_dependences ==="); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "compare all store-store pairs."); for (i = 0; i < VARRAY_ACTIVE_SIZE (loop_write_refs); i++) @@ -1000,7 +983,7 @@ vect_analyze_data_ref_dependences (loop_vec_info loop_vinfo) /* Examine load-store (true/anti) dependences. */ - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "compare all load-store pairs."); for (i = 0; i < VARRAY_ACTIVE_SIZE (loop_read_refs); i++) @@ -1042,7 +1025,7 @@ vect_compute_data_ref_alignment (struct data_reference *dr) bool base_aligned_p; tree misalign; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "vect_compute_data_ref_alignment:"); /* Initialize misalignment to unknown. */ @@ -1055,7 +1038,7 @@ vect_compute_data_ref_alignment (struct data_reference *dr) if (!misalign) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "Unknown alignment for access: "); print_generic_expr (vect_dump, base, TDF_SLIM); @@ -1067,7 +1050,7 @@ vect_compute_data_ref_alignment (struct data_reference *dr) { if (!vect_can_force_dr_alignment_p (base, TYPE_ALIGN (vectype))) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "can't force alignment of ref: "); print_generic_expr (vect_dump, ref, TDF_SLIM); @@ -1078,7 +1061,7 @@ vect_compute_data_ref_alignment (struct data_reference *dr) /* Force the alignment of the decl. NOTE: This is the only change to the code we make during the analysis phase, before deciding to vectorize the loop. */ - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "force alignment"); DECL_ALIGN (base) = TYPE_ALIGN (vectype); DECL_USER_ALIGN (base) = 1; @@ -1097,14 +1080,14 @@ vect_compute_data_ref_alignment (struct data_reference *dr) if (tree_int_cst_sgn (misalign) < 0) { /* Negative misalignment value. */ - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "unexpected misalign value"); return false; } DR_MISALIGNMENT (dr) = tree_low_cst (misalign, 1); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "misalign = %d bytes", DR_MISALIGNMENT (dr)); return true; @@ -1356,7 +1339,7 @@ vect_analyze_data_refs_alignment (loop_vec_info loop_vinfo) enum dr_alignment_support supportable_dr_alignment; unsigned int i; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "=== vect_analyze_data_refs_alignment ==="); @@ -1365,8 +1348,7 @@ vect_analyze_data_refs_alignment (loop_vec_info loop_vinfo) if (!vect_compute_data_refs_alignment (loop_vinfo)) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: can't calculate alignment for data ref."); return false; @@ -1388,13 +1370,12 @@ vect_analyze_data_refs_alignment (loop_vec_info loop_vinfo) supportable_dr_alignment = vect_supportable_dr_alignment (dr); if (!supportable_dr_alignment) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: unsupported unaligned load."); return false; } if (supportable_dr_alignment != dr_aligned - && (vect_print_dump_info (REPORT_ALIGNMENT, LOOP_LOC (loop_vinfo)))) + && (vect_print_dump_info (REPORT_ALIGNMENT))) fprintf (vect_dump, "Vectorizing an unaligned access."); } for (i = 0; i < VARRAY_ACTIVE_SIZE (loop_write_datarefs); i++) @@ -1403,17 +1384,16 @@ vect_analyze_data_refs_alignment (loop_vec_info loop_vinfo) supportable_dr_alignment = vect_supportable_dr_alignment (dr); if (!supportable_dr_alignment) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: unsupported unaligned store."); return false; } if (supportable_dr_alignment != dr_aligned - && (vect_print_dump_info (REPORT_ALIGNMENT, LOOP_LOC (loop_vinfo)))) + && (vect_print_dump_info (REPORT_ALIGNMENT))) fprintf (vect_dump, "Vectorizing an unaligned access."); } if (LOOP_VINFO_UNALIGNED_DR (loop_vinfo) - && vect_print_dump_info (REPORT_ALIGNMENT, LOOP_LOC (loop_vinfo))) + && vect_print_dump_info (REPORT_ALIGNMENT)) fprintf (vect_dump, "Alignment of access forced using peeling."); return true; @@ -1435,7 +1415,7 @@ vect_analyze_data_ref_access (struct data_reference *dr) if (!step || tree_int_cst_compare (step, TYPE_SIZE_UNIT (scalar_type))) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "not consecutive access"); return false; } @@ -1459,7 +1439,7 @@ vect_analyze_data_ref_accesses (loop_vec_info loop_vinfo) varray_type loop_write_datarefs = LOOP_VINFO_DATAREF_WRITES (loop_vinfo); varray_type loop_read_datarefs = LOOP_VINFO_DATAREF_READS (loop_vinfo); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "=== vect_analyze_data_ref_accesses ==="); for (i = 0; i < VARRAY_ACTIVE_SIZE (loop_write_datarefs); i++) @@ -1468,8 +1448,7 @@ vect_analyze_data_ref_accesses (loop_vec_info loop_vinfo) bool ok = vect_analyze_data_ref_access (dr); if (!ok) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: complicated access pattern."); return false; } @@ -1481,8 +1460,7 @@ vect_analyze_data_ref_accesses (loop_vec_info loop_vinfo) bool ok = vect_analyze_data_ref_access (dr); if (!ok) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: complicated access pattern."); return false; } @@ -1521,8 +1499,7 @@ vect_analyze_pointer_ref_access (tree memref, tree stmt, bool is_read, if (!vect_is_simple_iv_evolution (loopnum, access_fn, &init, &step)) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: pointer access is not simple."); return NULL; } @@ -1531,8 +1508,7 @@ vect_analyze_pointer_ref_access (tree memref, tree stmt, bool is_read, if (!expr_invariant_in_loop_p (loop, init)) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: initial condition is not loop invariant."); return NULL; @@ -1540,8 +1516,7 @@ vect_analyze_pointer_ref_access (tree memref, tree stmt, bool is_read, if (TREE_CODE (step) != INTEGER_CST) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: non constant step for pointer access."); return NULL; @@ -1550,16 +1525,14 @@ vect_analyze_pointer_ref_access (tree memref, tree stmt, bool is_read, reftype = TREE_TYPE (TREE_OPERAND (memref, 0)); if (!POINTER_TYPE_P (reftype)) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: unexpected pointer access form."); return NULL; } if (!POINTER_TYPE_P (TREE_TYPE (init))) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: unexpected pointer access form."); return NULL; } @@ -1568,9 +1541,8 @@ vect_analyze_pointer_ref_access (tree memref, tree stmt, bool is_read, innertype = TREE_TYPE (reftype); if (!COMPLETE_TYPE_P (innertype)) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) - fprintf (vect_dump, "not vectorized: pointer to incomplete type."); + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) + fprintf (vect_dump, "not vectorized: pointer to incomplete type."); return NULL; } @@ -1578,15 +1550,14 @@ vect_analyze_pointer_ref_access (tree memref, tree stmt, bool is_read, if (!integer_zerop (size_binop (TRUNC_MOD_EXPR, *ptr_step, fold_convert (ssizetype, TYPE_SIZE_UNIT (innertype))))) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: non consecutive access."); return NULL; } indx_access_fn = build_polynomial_chrec (loopnum, integer_zero_node, integer_one_node); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "Access function of ptr indx: "); print_generic_expr (vect_dump, indx_access_fn, TDF_SLIM); @@ -1810,7 +1781,7 @@ vect_object_analysis (tree memref, tree stmt, bool is_read, && !vect_analyze_offset_expr (poffset, loop, TYPE_SIZE_UNIT (vectype), &object_offset, &object_misalign, &object_step)) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "failed to compute offset or step for "); print_generic_expr (vect_dump, memref, TDF_SLIM); @@ -1824,7 +1795,7 @@ vect_object_analysis (tree memref, tree stmt, bool is_read, /* Check that there is no remainder in bits. */ if (pbitpos%BITS_PER_UNIT) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "bit offset alignment."); return NULL_TREE; } @@ -1852,7 +1823,7 @@ vect_object_analysis (tree memref, tree stmt, bool is_read, /* We expect to get a decl only if we already have a DR. */ if (!(*dr)) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "unhandled decl "); print_generic_expr (vect_dump, memref, TDF_SLIM); @@ -1889,12 +1860,11 @@ vect_object_analysis (tree memref, tree stmt, bool is_read, access_fn = analyze_scalar_evolution (loop, ptr_ref); if (!access_fn) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: complicated pointer access."); return NULL_TREE; } - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "Access function of ptr: "); print_generic_expr (vect_dump, access_fn, TDF_SLIM); @@ -1916,8 +1886,7 @@ vect_object_analysis (tree memref, tree stmt, bool is_read, { if (!(*dr)) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: ptr is loop invariant."); return NULL_TREE; } @@ -1951,8 +1920,7 @@ vect_object_analysis (tree memref, tree stmt, bool is_read, *memtag = TREE_OPERAND (base_address, 0); break; default: - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) { fprintf (vect_dump, "not vectorized: no memtag ref: "); print_generic_expr (vect_dump, memref, TDF_SLIM); @@ -1978,7 +1946,7 @@ vect_object_analysis (tree memref, tree stmt, bool is_read, *step = size_binop (PLUS_EXPR, object_step, address_step); *base_aligned = object_base_aligned && address_base_aligned; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "Results of object analysis for: "); print_generic_expr (vect_dump, memref, TDF_SLIM); @@ -2030,7 +1998,7 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo) int j; struct data_reference *dr; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "=== vect_analyze_data_refs ==="); for (j = 0; j < nbbs; j++) @@ -2061,7 +2029,7 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo) if (!no_vuse && !no_vmaymust) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "unexpected vdefs and vuses in stmt: "); print_generic_expr (vect_dump, stmt, TDF_SLIM); @@ -2071,7 +2039,7 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo) if (TREE_CODE (stmt) != MODIFY_EXPR) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "unexpected vops in stmt: "); print_generic_expr (vect_dump, stmt, TDF_SLIM); @@ -2096,7 +2064,7 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo) vectype = get_vectype_for_scalar_type (scalar_type); if (!vectype) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "no vectype for stmt: "); print_generic_expr (vect_dump, stmt, TDF_SLIM); @@ -2115,8 +2083,7 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo) &subvars); if (!base) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) { fprintf (vect_dump, "not vectorized: unhandled data ref: "); print_generic_expr (vect_dump, stmt, TDF_SLIM); @@ -2155,7 +2122,7 @@ vect_mark_relevant (VEC(tree,heap) **worklist, tree stmt, bool save_relevant_p = STMT_VINFO_RELEVANT_P (stmt_info); bool save_live_p = STMT_VINFO_LIVE_P (stmt_info); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "mark relevant %d, live %d.",relevant_p, live_p); STMT_VINFO_LIVE_P (stmt_info) |= live_p; @@ -2169,7 +2136,7 @@ vect_mark_relevant (VEC(tree,heap) **worklist, tree stmt, if (STMT_VINFO_RELEVANT_P (stmt_info) == save_relevant_p && STMT_VINFO_LIVE_P (stmt_info) == save_live_p) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "already marked relevant/live."); return; } @@ -2211,7 +2178,7 @@ vect_stmt_relevant_p (tree stmt, loop_vec_info loop_vinfo, if (TREE_CODE (stmt) != PHI_NODE) if (!ZERO_SSA_OPERANDS (stmt, SSA_OP_VIRTUAL_DEFS)) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "vec_stmt_relevant_p: stmt has vdefs."); *relevant_p = true; } @@ -2224,7 +2191,7 @@ vect_stmt_relevant_p (tree stmt, loop_vec_info loop_vinfo, basic_block bb = bb_for_stmt (USE_STMT (use_p)); if (!flow_bb_inside_loop_p (loop, bb)) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "vec_stmt_relevant_p: used out of loop."); /* We expect all such uses to be in the loop exit phis @@ -2276,7 +2243,7 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo) tree def, def_stmt; enum vect_def_type dt; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "=== vect_mark_stmts_to_be_vectorized ==="); worklist = VEC_alloc (tree, heap, 64); @@ -2286,7 +2253,7 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo) bb = loop->header; for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi)) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "init: phi relevant? "); print_generic_expr (vect_dump, phi, TDF_SLIM); @@ -2303,7 +2270,7 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo) { stmt = bsi_stmt (si); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "init: stmt relevant? "); print_generic_expr (vect_dump, stmt, TDF_SLIM); @@ -2321,7 +2288,7 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo) { stmt = VEC_pop (tree, worklist); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "worklist: examine stmt: "); print_generic_expr (vect_dump, stmt, TDF_SLIM); @@ -2393,8 +2360,7 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo) if (!vect_is_simple_use (use, loop_vinfo, &def_stmt, &def, &dt)) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, - LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: unsupported use in stmt."); VEC_free (tree, heap, worklist); return false; @@ -2403,7 +2369,7 @@ vect_mark_stmts_to_be_vectorized (loop_vec_info loop_vinfo) if (!def_stmt || IS_EMPTY_STMT (def_stmt)) continue; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "worklist: examine use %d: ", i); print_generic_expr (vect_dump, use, TDF_SLIM); @@ -2446,7 +2412,7 @@ vect_can_advance_ivs_p (loop_vec_info loop_vinfo) /* Analyze phi functions of the loop header. */ - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "=== vect_can_advance_ivs_p ==="); for (phi = phi_nodes (bb); phi; phi = PHI_CHAIN (phi)) @@ -2454,7 +2420,7 @@ vect_can_advance_ivs_p (loop_vec_info loop_vinfo) tree access_fn = NULL; tree evolution_part; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "Analyze phi: "); print_generic_expr (vect_dump, phi, TDF_SLIM); @@ -2465,7 +2431,7 @@ vect_can_advance_ivs_p (loop_vec_info loop_vinfo) if (!is_gimple_reg (SSA_NAME_VAR (PHI_RESULT (phi)))) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "virtual phi. skip."); continue; } @@ -2474,7 +2440,7 @@ vect_can_advance_ivs_p (loop_vec_info loop_vinfo) if (STMT_VINFO_DEF_TYPE (vinfo_for_stmt (phi)) == vect_reduction_def) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "reduc phi. skip."); continue; } @@ -2486,12 +2452,12 @@ vect_can_advance_ivs_p (loop_vec_info loop_vinfo) if (!access_fn) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "No Access function."); return false; } - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "Access function of PHI: "); print_generic_expr (vect_dump, access_fn, TDF_SLIM); @@ -2501,7 +2467,7 @@ vect_can_advance_ivs_p (loop_vec_info loop_vinfo) if (evolution_part == NULL_TREE) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "No evolution."); return false; } @@ -2529,7 +2495,7 @@ vect_get_loop_niters (struct loop *loop, tree *number_of_iterations) { tree niters; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "=== get_loop_niters ==="); niters = number_of_iterations_in_loop (loop); @@ -2539,7 +2505,7 @@ vect_get_loop_niters (struct loop *loop, tree *number_of_iterations) { *number_of_iterations = niters; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "==> get_loop_niters:" ); print_generic_expr (vect_dump, *number_of_iterations, TDF_SLIM); @@ -2566,16 +2532,13 @@ vect_analyze_loop_form (struct loop *loop) loop_vec_info loop_vinfo; tree loop_cond; tree number_of_iterations = NULL; - LOC loop_loc; - loop_loc = find_loop_location (loop); - - if (vect_print_dump_info (REPORT_DETAILS, loop_loc)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "=== vect_analyze_loop_form ==="); if (loop->inner) { - if (vect_print_dump_info (REPORT_OUTER_LOOPS, loop_loc)) + if (vect_print_dump_info (REPORT_OUTER_LOOPS)) fprintf (vect_dump, "not vectorized: nested loop."); return NULL; } @@ -2584,7 +2547,7 @@ vect_analyze_loop_form (struct loop *loop) || loop->num_nodes != 2 || EDGE_COUNT (loop->header->preds) != 2) { - if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS, loop_loc)) + if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS)) { if (!loop->single_exit) fprintf (vect_dump, "not vectorized: multiple exits."); @@ -2603,7 +2566,7 @@ vect_analyze_loop_form (struct loop *loop) executable statements, and the latch is empty. */ if (!empty_block_p (loop->latch)) { - if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS, loop_loc)) + if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS)) fprintf (vect_dump, "not vectorized: unexpected loop form."); return NULL; } @@ -2615,12 +2578,12 @@ vect_analyze_loop_form (struct loop *loop) if (!(e->flags & EDGE_ABNORMAL)) { split_loop_exit_edge (e); - if (vect_print_dump_info (REPORT_DETAILS, loop_loc)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "split exit edge."); } else { - if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS, loop_loc)) + if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS)) fprintf (vect_dump, "not vectorized: abnormal loop exit edge."); return NULL; } @@ -2628,7 +2591,7 @@ vect_analyze_loop_form (struct loop *loop) if (empty_block_p (loop->header)) { - if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS, loop_loc)) + if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS)) fprintf (vect_dump, "not vectorized: empty loop."); return NULL; } @@ -2636,14 +2599,14 @@ vect_analyze_loop_form (struct loop *loop) loop_cond = vect_get_loop_niters (loop, &number_of_iterations); if (!loop_cond) { - if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS, loop_loc)) + if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS)) fprintf (vect_dump, "not vectorized: complicated exit condition."); return NULL; } if (!number_of_iterations) { - if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS, loop_loc)) + if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS)) fprintf (vect_dump, "not vectorized: number of iterations cannot be computed."); return NULL; @@ -2651,7 +2614,7 @@ vect_analyze_loop_form (struct loop *loop) if (chrec_contains_undetermined (number_of_iterations)) { - if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS, loop_loc)) + if (vect_print_dump_info (REPORT_BAD_FORM_LOOPS)) fprintf (vect_dump, "Infinite number of iterations."); return false; } @@ -2661,7 +2624,7 @@ vect_analyze_loop_form (struct loop *loop) if (!LOOP_VINFO_NITERS_KNOWN_P (loop_vinfo)) { - if (vect_print_dump_info (REPORT_DETAILS, loop_loc)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "Symbolic number of iterations is "); print_generic_expr (vect_dump, number_of_iterations, TDF_DETAILS); @@ -2670,13 +2633,12 @@ vect_analyze_loop_form (struct loop *loop) else if (LOOP_VINFO_INT_NITERS (loop_vinfo) == 0) { - if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS, loop_loc)) + if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS)) fprintf (vect_dump, "not vectorized: number of iterations = 0."); return NULL; } LOOP_VINFO_EXIT_COND (loop_vinfo) = loop_cond; - LOOP_VINFO_LOC (loop_vinfo) = loop_loc; return loop_vinfo; } @@ -2693,7 +2655,7 @@ vect_analyze_loop (struct loop *loop) bool ok; loop_vec_info loop_vinfo; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "===== analyze_loop_nest ====="); /* Check the CFG characteristics of the loop (nesting, entry/exit, etc. */ @@ -2701,7 +2663,7 @@ vect_analyze_loop (struct loop *loop) loop_vinfo = vect_analyze_loop_form (loop); if (!loop_vinfo) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "bad loop form."); return NULL; } @@ -2715,7 +2677,7 @@ vect_analyze_loop (struct loop *loop) ok = vect_analyze_data_refs (loop_vinfo); if (!ok) { - if (vect_print_dump_info (REPORT_DETAILS, LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "bad data references."); destroy_loop_vec_info (loop_vinfo); return NULL; @@ -2731,7 +2693,7 @@ vect_analyze_loop (struct loop *loop) ok = vect_mark_stmts_to_be_vectorized (loop_vinfo); if (!ok) { - if (vect_print_dump_info (REPORT_DETAILS, LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "unexpected pattern."); destroy_loop_vec_info (loop_vinfo); return NULL; @@ -2740,7 +2702,7 @@ vect_analyze_loop (struct loop *loop) ok = vect_determine_vectorization_factor (loop_vinfo); if (!ok) { - if (vect_print_dump_info (REPORT_DETAILS, LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "can't determine vectorization factor."); destroy_loop_vec_info (loop_vinfo); return NULL; @@ -2752,7 +2714,7 @@ vect_analyze_loop (struct loop *loop) ok = vect_analyze_data_ref_dependences (loop_vinfo); if (!ok) { - if (vect_print_dump_info (REPORT_DETAILS, LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "bad data dependence."); destroy_loop_vec_info (loop_vinfo); return NULL; @@ -2764,7 +2726,7 @@ vect_analyze_loop (struct loop *loop) ok = vect_analyze_data_ref_accesses (loop_vinfo); if (!ok) { - if (vect_print_dump_info (REPORT_DETAILS, LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "bad data access."); destroy_loop_vec_info (loop_vinfo); return NULL; @@ -2776,7 +2738,7 @@ vect_analyze_loop (struct loop *loop) ok = vect_analyze_data_refs_alignment (loop_vinfo); if (!ok) { - if (vect_print_dump_info (REPORT_DETAILS, LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "bad data alignment."); destroy_loop_vec_info (loop_vinfo); return NULL; @@ -2788,7 +2750,7 @@ vect_analyze_loop (struct loop *loop) ok = vect_analyze_operations (loop_vinfo); if (!ok) { - if (vect_print_dump_info (REPORT_DETAILS, LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "bad operation or unsupported loop bound."); destroy_loop_vec_info (loop_vinfo); return NULL; diff --git a/gcc/tree-vect-transform.c b/gcc/tree-vect-transform.c index 2929bdb..4d1a3e0 100644 --- a/gcc/tree-vect-transform.c +++ b/gcc/tree-vect-transform.c @@ -232,7 +232,7 @@ vect_create_addr_base_for_vector_ref (tree stmt, TREE_OPERAND (vec_stmt, 0) = new_temp; append_to_statement_list_force (vec_stmt, new_stmt_list); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "created "); print_generic_expr (vect_dump, vec_stmt, TDF_SLIM); @@ -332,7 +332,7 @@ vect_create_data_ref_ptr (tree stmt, block_stmt_iterator *bsi, tree offset, base_name = build_fold_indirect_ref (unshare_expr ( STMT_VINFO_VECT_DR_BASE_ADDRESS (stmt_info))); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { tree data_ref_base = base_name; fprintf (vect_dump, "create array_ref of type: "); @@ -497,7 +497,7 @@ vect_init_vector (tree stmt, tree vector_var) new_bb = bsi_insert_on_edge_immediate (pe, init_stmt); gcc_assert (!new_bb); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "created new init_stmt: "); print_generic_expr (vect_dump, init_stmt, TDF_SLIM); @@ -539,7 +539,7 @@ vect_get_vec_def_for_operand (tree op, tree stmt, tree *scalar_def) enum vect_def_type dt; bool is_simple_use; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "vect_get_vec_def_for_operand: "); print_generic_expr (vect_dump, op, TDF_SLIM); @@ -547,7 +547,7 @@ vect_get_vec_def_for_operand (tree op, tree stmt, tree *scalar_def) is_simple_use = vect_is_simple_use (op, loop_vinfo, &def_stmt, &def, &dt); gcc_assert (is_simple_use); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { if (def) { @@ -570,7 +570,7 @@ vect_get_vec_def_for_operand (tree op, tree stmt, tree *scalar_def) *scalar_def = op; /* Create 'vect_cst_ = {cst,cst,...,cst}' */ - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "Create vector_cst. nunits = %d", nunits); for (i = nunits - 1; i >= 0; --i) @@ -588,7 +588,7 @@ vect_get_vec_def_for_operand (tree op, tree stmt, tree *scalar_def) *scalar_def = def; /* Create 'vec_inv = {inv,inv,..,inv}' */ - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "Create vector_inv."); for (i = nunits - 1; i >= 0; --i) @@ -627,7 +627,7 @@ vect_get_vec_def_for_operand (tree op, tree stmt, tree *scalar_def) /* Case 5: operand is defined by loop-header phi - induction. */ case vect_induction_def: { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "induction - unsupported."); internal_error ("no support for induction"); /* FORNOW */ } @@ -647,7 +647,7 @@ vect_finish_stmt_generation (tree stmt, tree vec_stmt, block_stmt_iterator *bsi) { bsi_insert_before (bsi, vec_stmt, BSI_SAME_STMT); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "add new stmt: "); print_generic_expr (vect_dump, vec_stmt, TDF_SLIM); @@ -877,7 +877,7 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt, tree reduction_op, /* 1.2 set the loop-latch arg for the reduction-phi: */ add_phi_arg (reduction_phi, vect_def, loop_latch_edge (loop)); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "transform reduction: created def-use cycle:"); print_generic_expr (vect_dump, reduction_phi, TDF_SLIM); @@ -909,7 +909,7 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt, tree reduction_op, /*** Case 1: Create: v_out2 = reduc_expr <v_out1> */ - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "Reduce using direct vector reduction."); vec_dest = vect_create_destination_var (scalar_dest, vectype); @@ -965,7 +965,7 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt, tree reduction_op, Create: va = vop <va, va'> } */ - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "Reduce using vector shifts"); vec_dest = vect_create_destination_var (scalar_dest, vectype); @@ -982,7 +982,7 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt, tree reduction_op, new_name = make_ssa_name (vec_dest, epilog_stmt); TREE_OPERAND (epilog_stmt, 0) = new_name; bsi_insert_after (&exit_bsi, epilog_stmt, BSI_NEW_STMT); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) print_generic_expr (vect_dump, epilog_stmt, TDF_SLIM); @@ -991,7 +991,7 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt, tree reduction_op, new_temp = make_ssa_name (vec_dest, epilog_stmt); TREE_OPERAND (epilog_stmt, 0) = new_temp; bsi_insert_after (&exit_bsi, epilog_stmt, BSI_NEW_STMT); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) print_generic_expr (vect_dump, epilog_stmt, TDF_SLIM); } @@ -1008,7 +1008,7 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt, tree reduction_op, Create: s = op <s, s'> } */ - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "Reduce using scalar code. "); vec_temp = PHI_RESULT (new_phi); @@ -1026,7 +1026,7 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt, tree reduction_op, new_temp = make_ssa_name (new_scalar_dest, epilog_stmt); TREE_OPERAND (epilog_stmt, 0) = new_temp; bsi_insert_after (&exit_bsi, epilog_stmt, BSI_NEW_STMT); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) print_generic_expr (vect_dump, epilog_stmt, TDF_SLIM); bit_offset = element_bitsize; @@ -1049,7 +1049,7 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt, tree reduction_op, new_name = make_ssa_name (new_scalar_dest, epilog_stmt); TREE_OPERAND (epilog_stmt, 0) = new_name; bsi_insert_after (&exit_bsi, epilog_stmt, BSI_NEW_STMT); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) print_generic_expr (vect_dump, epilog_stmt, TDF_SLIM); @@ -1058,7 +1058,7 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt, tree reduction_op, new_temp = make_ssa_name (new_scalar_dest, epilog_stmt); TREE_OPERAND (epilog_stmt, 0) = new_temp; bsi_insert_after (&exit_bsi, epilog_stmt, BSI_NEW_STMT); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) print_generic_expr (vect_dump, epilog_stmt, TDF_SLIM); } @@ -1073,7 +1073,7 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt, tree reduction_op, if (extract_scalar_result) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "extract scalar result"); /* The result is in the low order bits. */ @@ -1090,7 +1090,7 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt, tree reduction_op, new_temp = make_ssa_name (new_scalar_dest, epilog_stmt); TREE_OPERAND (epilog_stmt, 0) = new_temp; bsi_insert_after (&exit_bsi, epilog_stmt, BSI_NEW_STMT); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) print_generic_expr (vect_dump, epilog_stmt, TDF_SLIM); } @@ -1110,7 +1110,7 @@ vect_create_epilog_for_reduction (tree vect_def, tree stmt, tree reduction_op, TREE_OPERAND (epilog_stmt, 0) = new_temp; bsi_insert_after (&exit_bsi, epilog_stmt, BSI_NEW_STMT); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) print_generic_expr (vect_dump, epilog_stmt, TDF_SLIM); } @@ -1218,20 +1218,20 @@ vectorizable_reduction (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) optab = optab_for_tree_code (code, vectype); if (!optab) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "no optab."); return false; } vec_mode = TYPE_MODE (vectype); if (optab->handlers[(int) vec_mode].insn_code == CODE_FOR_nothing) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "op not supported by target."); if (GET_MODE_SIZE (vec_mode) != UNITS_PER_WORD || LOOP_VINFO_VECT_FACTOR (loop_vinfo) < vect_min_worthwhile_factor (code)) return false; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "proceeding using word mode."); } @@ -1240,7 +1240,7 @@ vectorizable_reduction (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) && LOOP_VINFO_VECT_FACTOR (loop_vinfo) < vect_min_worthwhile_factor (code)) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "not worthwhile without SIMD support."); return false; } @@ -1251,13 +1251,13 @@ vectorizable_reduction (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) reduc_optab = optab_for_tree_code (reduc_code, vectype); if (!reduc_optab) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "no optab for reduction."); reduc_code = NUM_TREE_CODES; } if (reduc_optab->handlers[(int) vec_mode].insn_code == CODE_FOR_nothing) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "reduc op not supported by target."); reduc_code = NUM_TREE_CODES; } @@ -1270,7 +1270,7 @@ vectorizable_reduction (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) /** Transform. **/ - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "transform reduction."); /* Create the destination vector */ @@ -1338,7 +1338,7 @@ vectorizable_assignment (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) op = TREE_OPERAND (stmt, 1); if (!vect_is_simple_use (op, loop_vinfo, &def_stmt, &def, &dt)) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "use not simple."); return false; } @@ -1350,7 +1350,7 @@ vectorizable_assignment (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) } /** Transform. **/ - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "transform assignment."); /* Handle def. */ @@ -1434,7 +1434,7 @@ vectorizable_operation (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) if (STMT_VINFO_LIVE_P (stmt_info)) { /* FORNOW: not yet supported. */ - if (vect_print_dump_info (REPORT_DETAILS, LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "value used after loop."); return false; } @@ -1453,7 +1453,7 @@ vectorizable_operation (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) op_type = TREE_CODE_LENGTH (code); if (op_type != unary_op && op_type != binary_op) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "num. args = %d (not unary/binary op).", op_type); return false; } @@ -1463,7 +1463,7 @@ vectorizable_operation (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) op = TREE_OPERAND (operation, i); if (!vect_is_simple_use (op, loop_vinfo, &def_stmt, &def, &dt)) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "use not simple."); return false; } @@ -1472,20 +1472,20 @@ vectorizable_operation (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) /* Supportable by target? */ if (!optab) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "no optab."); return false; } vec_mode = TYPE_MODE (vectype); if (optab->handlers[(int) vec_mode].insn_code == CODE_FOR_nothing) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "op not supported by target."); if (GET_MODE_SIZE (vec_mode) != UNITS_PER_WORD || LOOP_VINFO_VECT_FACTOR (loop_vinfo) < vect_min_worthwhile_factor (code)) return false; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "proceeding using word mode."); } @@ -1494,7 +1494,7 @@ vectorizable_operation (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) && LOOP_VINFO_VECT_FACTOR (loop_vinfo) < vect_min_worthwhile_factor (code)) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "not worthwhile without SIMD support."); return false; } @@ -1507,7 +1507,7 @@ vectorizable_operation (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) /** Transform. **/ - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "transform binary/unary operation."); /* Handle def. */ @@ -1579,7 +1579,7 @@ vectorizable_store (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) op = TREE_OPERAND (stmt, 1); if (!vect_is_simple_use (op, loop_vinfo, &def_stmt, &def, &dt)) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "use not simple."); return false; } @@ -1602,7 +1602,7 @@ vectorizable_store (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) /** Transform. **/ - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "transform store"); alignment_support_cheme = vect_supportable_dr_alignment (dr); @@ -1680,7 +1680,7 @@ vectorizable_load (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) if (STMT_VINFO_LIVE_P (stmt_info)) { /* FORNOW: not yet supported. */ - if (vect_print_dump_info (REPORT_DETAILS, LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "value used after loop."); return false; } @@ -1705,7 +1705,7 @@ vectorizable_load (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) (e.g. - data copies). */ if (mov_optab->handlers[mode].insn_code == CODE_FOR_nothing) { - if (vect_print_dump_info (REPORT_DETAILS, LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "Aligned load, but unsupported type."); return false; } @@ -1718,7 +1718,7 @@ vectorizable_load (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) /** Transform. **/ - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "transform load."); alignment_support_cheme = vect_supportable_dr_alignment (dr); @@ -1907,7 +1907,7 @@ vectorizable_live_operation (tree stmt, op = TREE_OPERAND (operation, i); if (!vect_is_simple_use (op, loop_vinfo, &def_stmt, &def, &dt)) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "use not simple."); return false; } @@ -1998,7 +1998,7 @@ vectorizable_condition (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt) if (STMT_VINFO_LIVE_P (stmt_info)) { /* FORNOW: not yet supported. */ - if (vect_print_dump_info (REPORT_DETAILS, LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "value used after loop."); return false; } @@ -2120,7 +2120,7 @@ vect_transform_stmt (tree stmt, block_stmt_iterator *bsi) break; default: - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "stmt not supported."); gcc_unreachable (); } @@ -2388,7 +2388,7 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo, tree niters, tree var, stmt, ni, ni_name; block_stmt_iterator last_bsi; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "vect_update_ivs_after_vectorizer: phi: "); print_generic_expr (vect_dump, phi, TDF_SLIM); @@ -2397,7 +2397,7 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo, tree niters, /* Skip virtual phi's. */ if (!is_gimple_reg (SSA_NAME_VAR (PHI_RESULT (phi)))) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "virtual phi. skip."); continue; } @@ -2405,7 +2405,7 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo, tree niters, /* Skip reduction phis. */ if (STMT_VINFO_DEF_TYPE (vinfo_for_stmt (phi)) == vect_reduction_def) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "reduc phi. skip."); continue; } @@ -2465,7 +2465,7 @@ vect_do_peeling_for_loop_bound (loop_vec_info loop_vinfo, tree *ratio, basic_block preheader; int loop_num; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "=== vect_do_peeling_for_loop_bound ==="); initialize_original_copy_tables (); @@ -2555,7 +2555,7 @@ vect_gen_niters_for_prolog_loop (loop_vec_info loop_vinfo, tree loop_niters) int element_size = vectype_align/vf; int elem_misalign = byte_misalign / element_size; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "known alignment = %d.", byte_misalign); iters = build_int_cst (niters_type, (vf - elem_misalign)&(vf-1)); } @@ -2598,7 +2598,7 @@ vect_gen_niters_for_prolog_loop (loop_vec_info loop_vinfo, tree loop_niters) if (TREE_CODE (loop_niters) != INTEGER_CST) iters = build2 (MIN_EXPR, niters_type, iters, loop_niters); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "niters for prolog loop: "); print_generic_expr (vect_dump, iters, TDF_SLIM); @@ -2687,7 +2687,7 @@ vect_do_peeling_for_alignment (loop_vec_info loop_vinfo, struct loops *loops) tree n_iters; struct loop *new_loop; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "=== vect_do_peeling_for_alignment ==="); initialize_original_copy_tables (); @@ -2737,7 +2737,7 @@ vect_transform_loop (loop_vec_info loop_vinfo, tree ratio = NULL; int vectorization_factor = LOOP_VINFO_VECT_FACTOR (loop_vinfo); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "=== vec_transform_loop ==="); /* Peel the loop if there are data refs with unknown alignment. @@ -2785,7 +2785,7 @@ vect_transform_loop (loop_vec_info loop_vinfo, stmt_vec_info stmt_info; bool is_store; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "------>vectorizing statement: "); print_generic_expr (vect_dump, stmt, TDF_SLIM); @@ -2805,7 +2805,7 @@ vect_transform_loop (loop_vec_info loop_vinfo, == (unsigned HOST_WIDE_INT) vectorization_factor); /* -------- vectorize statement ------------ */ - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "transform statement."); is_store = vect_transform_stmt (stmt, &si); @@ -2830,6 +2830,6 @@ vect_transform_loop (loop_vec_info loop_vinfo, until all the loops have been transformed? */ update_ssa (TODO_update_ssa); - if (vect_print_dump_info (REPORT_VECTORIZED_LOOPS, LOOP_LOC (loop_vinfo))) + if (vect_print_dump_info (REPORT_VECTORIZED_LOOPS)) fprintf (vect_dump, "LOOP VECTORIZED."); } diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c index 4b5b56f..ae389c6 100644 --- a/gcc/tree-vectorizer.c +++ b/gcc/tree-vectorizer.c @@ -176,6 +176,9 @@ enum verbosity_levels vect_verbosity_level = MAX_VERBOSITY_LEVEL; /* Number of loops, at the beginning of vectorization. */ unsigned int vect_loops_num; + +/* Loop location. */ +static LOC vect_loop_location; /************************************************************************* Simple Loop Peeling Utilities @@ -1299,17 +1302,18 @@ vect_set_dump_settings (void) For vectorization debug dumps. */ bool -vect_print_dump_info (enum verbosity_levels vl, LOC loc) +vect_print_dump_info (enum verbosity_levels vl) { if (vl > vect_verbosity_level) return false; - if (loc == UNKNOWN_LOC) + if (vect_loop_location == UNKNOWN_LOC) fprintf (vect_dump, "\n%s:%d: note: ", DECL_SOURCE_FILE (current_function_decl), DECL_SOURCE_LINE (current_function_decl)); else - fprintf (vect_dump, "\n%s:%d: note: ", LOC_FILE (loc), LOC_LINE (loc)); + fprintf (vect_dump, "\n%s:%d: note: ", + LOC_FILE (vect_loop_location), LOC_LINE (vect_loop_location)); return true; @@ -1407,7 +1411,6 @@ new_loop_vec_info (struct loop *loop) VARRAY_GENERIC_PTR_INIT (LOOP_VINFO_DATAREF_READS (res), 20, "loop_read_datarefs"); LOOP_VINFO_UNALIGNED_DR (res) = NULL; - LOOP_VINFO_LOC (res) = UNKNOWN_LOC; return res; } @@ -1549,7 +1552,7 @@ get_vectype_for_scalar_type (tree scalar_type) nunits = UNITS_PER_SIMD_WORD / nbytes; vectype = build_vector_type (scalar_type, nunits); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "get vectype with %d units of type ", nunits); print_generic_expr (vect_dump, scalar_type, TDF_SLIM); @@ -1558,7 +1561,7 @@ get_vectype_for_scalar_type (tree scalar_type) if (!vectype) return NULL_TREE; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "vectype: "); print_generic_expr (vect_dump, vectype, TDF_SLIM); @@ -1567,7 +1570,7 @@ get_vectype_for_scalar_type (tree scalar_type) if (!VECTOR_MODE_P (TYPE_MODE (vectype)) && !INTEGRAL_MODE_P (TYPE_MODE (vectype))) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "mode not supported by target."); return NULL_TREE; } @@ -1633,7 +1636,7 @@ vect_is_simple_use (tree operand, loop_vec_info loop_vinfo, tree *def_stmt, *def_stmt = NULL_TREE; *def = NULL_TREE; - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "vect_is_simple_use: operand "); print_generic_expr (vect_dump, operand, TDF_SLIM); @@ -1647,7 +1650,7 @@ vect_is_simple_use (tree operand, loop_vec_info loop_vinfo, tree *def_stmt, if (TREE_CODE (operand) != SSA_NAME) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "not ssa-name."); return false; } @@ -1655,12 +1658,12 @@ vect_is_simple_use (tree operand, loop_vec_info loop_vinfo, tree *def_stmt, *def_stmt = SSA_NAME_DEF_STMT (operand); if (*def_stmt == NULL_TREE ) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "no def_stmt."); return false; } - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "def_stmt: "); print_generic_expr (vect_dump, *def_stmt, TDF_SLIM); @@ -1678,7 +1681,7 @@ vect_is_simple_use (tree operand, loop_vec_info loop_vinfo, tree *def_stmt, return true; } - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "Unexpected empty stmt."); return false; } @@ -1694,7 +1697,7 @@ vect_is_simple_use (tree operand, loop_vec_info loop_vinfo, tree *def_stmt, if (*dt == vect_unknown_def_type) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "Unsupported pattern."); return false; } @@ -1703,12 +1706,12 @@ vect_is_simple_use (tree operand, loop_vec_info loop_vinfo, tree *def_stmt, a reduction operation cannot have uses in the loop. */ if (*dt == vect_reduction_def && TREE_CODE (*def_stmt) != PHI_NODE) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "reduction used in loop."); return false; } - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "type of def: %d.",*dt); switch (TREE_CODE (*def_stmt)) @@ -1725,14 +1728,14 @@ vect_is_simple_use (tree operand, loop_vec_info loop_vinfo, tree *def_stmt, break; default: - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "unsupported defining stmt: "); return false; } if (*dt == vect_induction_def) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "induction not supported."); return false; } @@ -1810,7 +1813,7 @@ vect_is_simple_reduction (struct loop *loop ATTRIBUTE_UNUSED, if (TREE_CODE (loop_arg) != SSA_NAME) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "reduction: not ssa_name: "); print_generic_expr (vect_dump, loop_arg, TDF_SLIM); @@ -1821,14 +1824,14 @@ vect_is_simple_reduction (struct loop *loop ATTRIBUTE_UNUSED, def_stmt = SSA_NAME_DEF_STMT (loop_arg); if (!def_stmt) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "reduction: no def_stmt."); return NULL_TREE; } if (TREE_CODE (def_stmt) != MODIFY_EXPR) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { print_generic_expr (vect_dump, def_stmt, TDF_SLIM); } @@ -1839,7 +1842,7 @@ vect_is_simple_reduction (struct loop *loop ATTRIBUTE_UNUSED, code = TREE_CODE (operation); if (!commutative_tree_code (code) || !associative_tree_code (code)) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "reduction: not commutative/associative: "); print_generic_expr (vect_dump, operation, TDF_SLIM); @@ -1850,7 +1853,7 @@ vect_is_simple_reduction (struct loop *loop ATTRIBUTE_UNUSED, op_type = TREE_CODE_LENGTH (code); if (op_type != binary_op) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "reduction: not binary operation: "); print_generic_expr (vect_dump, operation, TDF_SLIM); @@ -1862,7 +1865,7 @@ vect_is_simple_reduction (struct loop *loop ATTRIBUTE_UNUSED, op2 = TREE_OPERAND (operation, 1); if (TREE_CODE (op1) != SSA_NAME || TREE_CODE (op2) != SSA_NAME) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "reduction: uses not ssa_names: "); print_generic_expr (vect_dump, operation, TDF_SLIM); @@ -1875,7 +1878,7 @@ vect_is_simple_reduction (struct loop *loop ATTRIBUTE_UNUSED, if (TYPE_MAIN_VARIANT (type) != TYPE_MAIN_VARIANT (TREE_TYPE (op1)) || TYPE_MAIN_VARIANT (type) != TYPE_MAIN_VARIANT (TREE_TYPE (op2))) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "reduction: multiple types: operation type: "); print_generic_expr (vect_dump, type, TDF_SLIM); @@ -1891,7 +1894,7 @@ vect_is_simple_reduction (struct loop *loop ATTRIBUTE_UNUSED, if (SCALAR_FLOAT_TYPE_P (type) && !flag_unsafe_math_optimizations) { /* Changing the order of operations changes the sematics. */ - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "reduction: unsafe fp math optimization: "); print_generic_expr (vect_dump, operation, TDF_SLIM); @@ -1901,7 +1904,7 @@ vect_is_simple_reduction (struct loop *loop ATTRIBUTE_UNUSED, else if (INTEGRAL_TYPE_P (type) && !TYPE_UNSIGNED (type) && flag_trapv) { /* Changing the order of operations changes the sematics. */ - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "reduction: unsafe int math optimization: "); print_generic_expr (vect_dump, operation, TDF_SLIM); @@ -1917,7 +1920,7 @@ vect_is_simple_reduction (struct loop *loop ATTRIBUTE_UNUSED, def2 = SSA_NAME_DEF_STMT (op2); if (!def1 || !def2) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "reduction: no defs for operands: "); print_generic_expr (vect_dump, operation, TDF_SLIM); @@ -1929,7 +1932,7 @@ vect_is_simple_reduction (struct loop *loop ATTRIBUTE_UNUSED, && flow_bb_inside_loop_p (loop, bb_for_stmt (def1)) && def2 == phi) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "detected reduction:"); print_generic_expr (vect_dump, operation, TDF_SLIM); @@ -1946,7 +1949,7 @@ vect_is_simple_reduction (struct loop *loop ATTRIBUTE_UNUSED, /* Swap operands (just for simplicity - so that the rest of the code can assume that the reduction variable is always the last (second) argument). */ - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "detected reduction: need to swap operands:"); print_generic_expr (vect_dump, operation, TDF_SLIM); @@ -1965,7 +1968,7 @@ vect_is_simple_reduction (struct loop *loop ATTRIBUTE_UNUSED, } else { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "reduction: unknown pattern."); print_generic_expr (vect_dump, operation, TDF_SLIM); @@ -2003,7 +2006,7 @@ vect_is_simple_iv_evolution (unsigned loop_nb, tree access_fn, tree * init, init_expr = unshare_expr (initial_condition_in_loop_num (access_fn, loop_nb)); - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) { fprintf (vect_dump, "step: "); print_generic_expr (vect_dump, step_expr, TDF_SLIM); @@ -2016,7 +2019,7 @@ vect_is_simple_iv_evolution (unsigned loop_nb, tree access_fn, tree * init, if (TREE_CODE (step_expr) != INTEGER_CST) { - if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "step unknown."); return false; } @@ -2052,6 +2055,7 @@ vectorize_loops (struct loops *loops) if (!loop) continue; + vect_loop_location = find_loop_location (loop); loop_vinfo = vect_analyze_loop (loop); loop->aux = loop_vinfo; @@ -2062,7 +2066,7 @@ vectorize_loops (struct loops *loops) num_vectorized_loops++; } - if (vect_print_dump_info (REPORT_VECTORIZED_LOOPS, UNKNOWN_LOC)) + if (vect_print_dump_info (REPORT_VECTORIZED_LOOPS)) fprintf (vect_dump, "vectorized %u loops in function.\n", num_vectorized_loops); diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 2eb29a0..87d3138 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -122,8 +122,6 @@ typedef struct _loop_vec_info { /* All data references in the loop that are being read from. */ varray_type data_ref_reads; - /* The loop location in the source. */ - LOC loop_line_number; } *loop_vec_info; /* Access Functions. */ @@ -138,9 +136,6 @@ typedef struct _loop_vec_info { #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_LOC(L) (L)->loop_line_number - -#define LOOP_LOC(L) LOOP_VINFO_LOC(L) #define LOOP_VINFO_NITERS_KNOWN_P(L) \ @@ -311,6 +306,7 @@ extern enum verbosity_levels vect_verbosity_level; /* Number of loops, at the beginning of vectorization. */ extern unsigned int vect_loops_num; + /*-----------------------------------------------------------------*/ /* Function prototypes. */ /*-----------------------------------------------------------------*/ @@ -374,7 +370,7 @@ extern void vect_transform_loop (loop_vec_info, struct loops *); /************************************************************************* Vectorization Debug Information - in tree-vectorizer.c *************************************************************************/ -extern bool vect_print_dump_info (enum verbosity_levels, LOC); +extern bool vect_print_dump_info (enum verbosity_levels); extern void vect_set_verbosity_level (const char *); extern LOC find_loop_location (struct loop *); |