public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][vectorizer] Remove blank debug lines after dump_gimple_stmt
@ 2016-06-06 12:46 Alan Hayward
  2016-06-06 17:57 ` Jeff Law
  0 siblings, 1 reply; 3+ messages in thread
From: Alan Hayward @ 2016-06-06 12:46 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 1354 bytes --]

Lots of code calls dump_gimple_stmt then print a newline, however
dump_gimple_stmt will print a newline itself. This makes the vectorizer
debug
file messy. I think the confusion is because dump_generic_expr does NOT
print a
newline. This patch removes all prints of a newline direcly after a
dump_gimple_stmt.

Tested by examining a selection of vect dump files.

	gcc/
	\* tree-vect-data-refs.c (vect_analyze_data_refs): Remove debug newline.
	\* tree-vect-loop-manip.c (slpeel_make_loop_iterate_ntimes): likewise.
	(vect_can_advance_ivs_p): likewise.
	(vect_update_ivs_after_vectorizer): likewise.
	\* tree-vect-loop.c (vect_determine_vectorization_factor): likewise.
	(vect_analyze_scalar_cycles_1): likewise.
	(vect_analyze_loop_operations): likewise.
	(report_vect_op): likewise.
	(vect_is_slp_reduction): likewise.
	(vect_is_simple_reduction): likewise.
	(get_initial_def_for_induction): likewise.
	(vect_transform_loop): likewise.
	\* tree-vect-patterns.c (vect_recog_dot_prod_pattern): likewise.
	(vect_recog_sad_pattern): likewise.
	(vect_recog_widen_sum_pattern): likewise.
	(vect_recog_widening_pattern): likewise.
	(vect_recog_divmod_pattern): likewise.
	\* tree-vect-slp.c (vect-build-slp_tree_1): likewise.
	(vect_analyze_slp_instance): likewise.
	(vect_transform_slp_perm_load): likewise.
	(vect_schedule_slp_instance): likewise.


Alan



[-- Attachment #2: removenewlines.patch --]
[-- Type: application/octet-stream, Size: 18400 bytes --]

diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index 36d302a056ca4af0124a6cff9ed0c9e0fc318283..e640bbda790858796fdd03134662b5534f8b4218 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -3557,7 +3557,6 @@ again:
                                    "not vectorized: data ref analysis "
                                    "failed ");
 		  dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM, stmt, 0);
-                  dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
 		}
 
 	      if (is_a <bb_vec_info> (vinfo))
@@ -3589,7 +3588,6 @@ again:
               dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
                                "not vectorized: volatile type ");
               dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM, stmt, 0);
-              dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
             }
 
           if (is_a <bb_vec_info> (vinfo))
@@ -3606,7 +3604,6 @@ again:
                                "not vectorized: statement can throw an "
                                "exception ");
               dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM, stmt, 0);
-              dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
             }
 
           if (is_a <bb_vec_info> (vinfo))
@@ -3626,7 +3623,6 @@ again:
                                "not vectorized: statement is bitfield "
                                "access ");
               dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM, stmt, 0);
-              dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
             }
 
           if (is_a <bb_vec_info> (vinfo))
@@ -3651,7 +3647,6 @@ again:
 	      dump_printf_loc (MSG_MISSED_OPTIMIZATION,  vect_location,
 	                       "not vectorized: dr in a call ");
 	      dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM, stmt, 0);
-	      dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
 	    }
 
 	  if (is_a <bb_vec_info> (vinfo))
@@ -3798,7 +3793,6 @@ again:
                                "not vectorized: more than one data ref "
                                "in stmt: ");
               dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM, stmt, 0);
-              dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
             }
 
           if (is_a <bb_vec_info> (vinfo))
@@ -3887,7 +3881,6 @@ again:
 				   "not vectorized: not suitable for scatter "
 				   "store ");
 		  dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM, stmt, 0);
-                  dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
 		}
 	      return false;
 	    }
@@ -3908,7 +3901,6 @@ again:
                                    "not vectorized: not suitable for strided "
                                    "load ");
 		  dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM, stmt, 0);
-                  dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
 		}
 	      return false;
 	    }
diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c
index 7ec6daec0e60e955e877db9d2409a3f99ab19269..508bbf0b281190c60179dc636dd9ccc093b200a1 100644
--- a/gcc/tree-vect-loop-manip.c
+++ b/gcc/tree-vect-loop-manip.c
@@ -710,7 +710,6 @@ slpeel_make_loop_iterate_ntimes (struct loop *loop, tree niters)
 	dump_printf (MSG_NOTE, "\nloop at %s:%d: ", LOCATION_FILE (loop_loc),
 		     LOCATION_LINE (loop_loc));
       dump_gimple_stmt (MSG_NOTE, TDF_SLIM, cond_stmt, 0);
-      dump_printf (MSG_NOTE, "\n");
     }
   loop->nb_iterations = niters;
 }
@@ -1557,7 +1556,6 @@ vect_can_advance_ivs_p (loop_vec_info loop_vinfo)
 	{
           dump_printf_loc (MSG_NOTE, vect_location, "Analyze phi: ");
           dump_gimple_stmt (MSG_NOTE, TDF_SLIM, phi, 0);
-          dump_printf (MSG_NOTE, "\n");
 	}
 
       /* Skip virtual phi's. The data dependences that are associated with
@@ -1678,7 +1676,6 @@ vect_update_ivs_after_vectorizer (loop_vec_info loop_vinfo, tree niters,
           dump_printf_loc (MSG_NOTE, vect_location,
                            "vect_update_ivs_after_vectorizer: phi: ");
 	  dump_gimple_stmt (MSG_NOTE, TDF_SLIM, phi, 0);
-          dump_printf (MSG_NOTE, "\n");
         }
 
       /* Skip virtual phi's.  */
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index bc1257c86d4d2fda3d4c2b2e6fdab6aa495d76c5..1f61c83deafa003529273e21f68bc48d3e6446b9 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -212,7 +212,6 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 	    {
 	      dump_printf_loc (MSG_NOTE, vect_location, "==> examining phi: ");
 	      dump_gimple_stmt (MSG_NOTE, TDF_SLIM, phi, 0);
-	      dump_printf (MSG_NOTE, "\n");
 	    }
 
 	  gcc_assert (stmt_info);
@@ -282,7 +281,6 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 	      dump_printf_loc (MSG_NOTE, vect_location,
                                "==> examining statement: ");
 	      dump_gimple_stmt (MSG_NOTE, TDF_SLIM, stmt, 0);
-              dump_printf (MSG_NOTE, "\n");
 	    }
 
 	  gcc_assert (stmt_info);
@@ -304,7 +302,6 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
                       dump_printf_loc (MSG_NOTE, vect_location,
                                        "==> examining pattern statement: ");
                       dump_gimple_stmt (MSG_NOTE, TDF_SLIM, stmt, 0);
-                      dump_printf (MSG_NOTE, "\n");
                     }
                 }
               else
@@ -355,7 +352,6 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
                                            "==> examining pattern def stmt: ");
 			  dump_gimple_stmt (MSG_NOTE, TDF_SLIM,
                                             pattern_def_stmt, 0);
-                          dump_printf (MSG_NOTE, "\n");
 			}
 
 		      stmt = pattern_def_stmt;
@@ -396,7 +392,6 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
                                    "not vectorized: irregular stmt.");
 		  dump_gimple_stmt (MSG_MISSED_OPTIMIZATION,  TDF_SLIM, stmt,
                                     0);
-                  dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
 		}
 	      return false;
 	    }
@@ -408,7 +403,6 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 	          dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
                                    "not vectorized: vector stmt in loop:");
 	          dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM, stmt, 0);
-                  dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
 	        }
 	      return false;
 	    }
@@ -625,7 +619,6 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 				       "for statement, ");
 		      dump_gimple_stmt (MSG_MISSED_OPTIMIZATION,  TDF_SLIM, stmt,
 					0);
-		      dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
 		    }
 		  return false;
 		}
@@ -695,7 +688,6 @@ vect_determine_vectorization_factor (loop_vec_info loop_vinfo)
 			       "for statement, ");
 	      dump_gimple_stmt (MSG_MISSED_OPTIMIZATION,  TDF_SLIM, stmt,
 				0);
-	      dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
 	    }
 	  return false;
 	}
@@ -799,7 +791,6 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop)
 	{
 	  dump_printf_loc (MSG_NOTE, vect_location, "Analyze phi: ");
 	  dump_gimple_stmt (MSG_NOTE, TDF_SLIM, phi, 0);
-          dump_printf (MSG_NOTE, "\n");
 	}
 
       /* Skip virtual phi's.  The data dependences that are associated with
@@ -859,7 +850,6 @@ vect_analyze_scalar_cycles_1 (loop_vec_info loop_vinfo, struct loop *loop)
         {
           dump_printf_loc (MSG_NOTE, vect_location, "Analyze phi: ");
           dump_gimple_stmt (MSG_NOTE, TDF_SLIM, phi, 0);
-          dump_printf (MSG_NOTE, "\n");
         }
 
       gcc_assert (!virtual_operand_p (def)
@@ -1623,7 +1613,6 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo)
             {
               dump_printf_loc (MSG_NOTE, vect_location, "examining phi: ");
               dump_gimple_stmt (MSG_NOTE, TDF_SLIM, phi, 0);
-              dump_printf (MSG_NOTE, "\n");
             }
 	  if (virtual_operand_p (gimple_phi_result (phi)))
 	    continue;
@@ -1705,7 +1694,6 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo)
 				   "not vectorized: relevant phi not "
 				   "supported: ");
                   dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM, phi, 0);
-                  dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
                 }
 	      return false;
             }
@@ -2337,7 +2325,6 @@ report_vect_op (int msg_type, gimple *stmt, const char *msg)
 {
   dump_printf_loc (msg_type, vect_location, "%s", msg);
   dump_gimple_stmt (msg_type, TDF_SLIM, stmt, 0);
-  dump_printf (msg_type, "\n");
 }
 
 
@@ -2508,7 +2495,6 @@ vect_is_slp_reduction (loop_vec_info loop_info, gimple *phi,
 		{
 		  dump_printf_loc (MSG_NOTE, vect_location, "swapping oprnds: ");
 		  dump_gimple_stmt (MSG_NOTE, TDF_SLIM, next_stmt, 0);
-                  dump_printf (MSG_NOTE, "\n");
 		}
 
 	      swap_ssa_operands (next_stmt,
@@ -2667,10 +2653,7 @@ vect_is_simple_reduction (loop_vec_info loop_info, gimple *phi,
   if (!is_gimple_assign (def_stmt) && gimple_code (def_stmt) != GIMPLE_PHI)
     {
       if (dump_enabled_p ())
-        {
-          dump_gimple_stmt (MSG_NOTE, TDF_SLIM, def_stmt, 0);
-          dump_printf (MSG_NOTE, "\n");
-        }
+	dump_gimple_stmt (MSG_NOTE, TDF_SLIM, def_stmt, 0);
       return NULL;
     }
 
@@ -3978,7 +3961,6 @@ get_initial_def_for_induction (gimple *iv_phi)
 	      dump_printf_loc (MSG_NOTE, vect_location,
 			       "vector of inductions after inner-loop:");
 	      dump_gimple_stmt (MSG_NOTE, TDF_SLIM, new_stmt, 0);
-              dump_printf (MSG_NOTE, "\n");
 	    }
 	}
     }
@@ -3989,10 +3971,8 @@ get_initial_def_for_induction (gimple *iv_phi)
       dump_printf_loc (MSG_NOTE, vect_location,
 		       "transform induction: created def-use cycle: ");
       dump_gimple_stmt (MSG_NOTE, TDF_SLIM, induction_phi, 0);
-      dump_printf (MSG_NOTE, "\n");
       dump_gimple_stmt (MSG_NOTE, TDF_SLIM,
 			SSA_NAME_DEF_STMT (vec_def), 0);
-      dump_printf (MSG_NOTE, "\n");
     }
 
   STMT_VINFO_VEC_STMT (phi_info) = induction_phi;
@@ -4414,9 +4394,7 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs, gimple *stmt,
               dump_printf_loc (MSG_NOTE, vect_location,
 			       "transform reduction: created def-use cycle: ");
               dump_gimple_stmt (MSG_NOTE, TDF_SLIM, phi, 0);
-              dump_printf (MSG_NOTE, "\n");
               dump_gimple_stmt (MSG_NOTE, TDF_SLIM, SSA_NAME_DEF_STMT (def), 0);
-              dump_printf (MSG_NOTE, "\n");
             }
         }
     }
@@ -5166,7 +5144,6 @@ vect_finalize_reduction:
                       dump_printf_loc (MSG_NOTE, vect_location,
 				       "created double reduction phi node: ");
                       dump_gimple_stmt (MSG_NOTE, TDF_SLIM, vect_phi, 0);
-                      dump_printf (MSG_NOTE, "\n");
                     }
 
                   vect_phi_res = PHI_RESULT (vect_phi);
@@ -6719,7 +6696,6 @@ vect_transform_loop (loop_vec_info loop_vinfo)
 	      dump_printf_loc (MSG_NOTE, vect_location,
                                "------>vectorizing phi: ");
 	      dump_gimple_stmt (MSG_NOTE, TDF_SLIM, phi, 0);
-              dump_printf (MSG_NOTE, "\n");
 	    }
 	  stmt_info = vinfo_for_stmt (phi);
 	  if (!stmt_info)
@@ -6772,7 +6748,6 @@ vect_transform_loop (loop_vec_info loop_vinfo)
 	      dump_printf_loc (MSG_NOTE, vect_location,
 			       "------>vectorizing statement: ");
 	      dump_gimple_stmt (MSG_NOTE, TDF_SLIM, stmt, 0);
-              dump_printf (MSG_NOTE, "\n");
 	    }
 
 	  stmt_info = vinfo_for_stmt (stmt);
@@ -6847,7 +6822,6 @@ vect_transform_loop (loop_vec_info loop_vinfo)
 					   "stmt: ");
 			  dump_gimple_stmt (MSG_NOTE, TDF_SLIM,
 					    pattern_def_stmt, 0);
-                          dump_printf (MSG_NOTE, "\n");
 			}
 
 		      stmt = pattern_def_stmt;
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c
index e1622a81b91d263a7fd3ad250f0632dd8ea42b6a..8a2221f935063002ecd02d2b20af5cb4bd7d9fee 100644
--- a/gcc/tree-vect-patterns.c
+++ b/gcc/tree-vect-patterns.c
@@ -431,7 +431,6 @@ vect_recog_dot_prod_pattern (vec<gimple *> *stmts, tree *type_in,
       dump_printf_loc (MSG_NOTE, vect_location,
                        "vect_recog_dot_prod_pattern: detected: ");
       dump_gimple_stmt (MSG_NOTE, TDF_SLIM, pattern_stmt, 0);
-      dump_printf (MSG_NOTE, "\n");
     }
 
   return pattern_stmt;
@@ -667,7 +666,6 @@ vect_recog_sad_pattern (vec<gimple *> *stmts, tree *type_in,
       dump_printf_loc (MSG_NOTE, vect_location,
                        "vect_recog_sad_pattern: detected: ");
       dump_gimple_stmt (MSG_NOTE, TDF_SLIM, pattern_stmt, 0);
-      dump_printf (MSG_NOTE, "\n");
     }
 
   return pattern_stmt;
@@ -1210,7 +1208,6 @@ vect_recog_widen_sum_pattern (vec<gimple *> *stmts, tree *type_in,
       dump_printf_loc (MSG_NOTE, vect_location,
                        "vect_recog_widen_sum_pattern: detected: ");
       dump_gimple_stmt (MSG_NOTE, TDF_SLIM, pattern_stmt, 0);
-      dump_printf (MSG_NOTE, "\n");
     }
 
   return pattern_stmt;
@@ -1510,7 +1507,6 @@ vect_recog_over_widening_pattern (vec<gimple *> *stmts,
           dump_printf_loc (MSG_NOTE, vect_location,
                            "created pattern stmt: ");
           dump_gimple_stmt (MSG_NOTE, TDF_SLIM, pattern_stmt, 0);
-          dump_printf (MSG_NOTE, "\n");
         }
 
       type = gimple_expr_type (stmt);
@@ -1578,7 +1574,6 @@ vect_recog_over_widening_pattern (vec<gimple *> *stmts,
       dump_printf_loc (MSG_NOTE, vect_location,
                        "vect_recog_over_widening_pattern: detected: ");
       dump_gimple_stmt (MSG_NOTE, TDF_SLIM, pattern_stmt, 0);
-      dump_printf (MSG_NOTE, "\n");
     }
 
   return pattern_stmt;
@@ -2717,7 +2712,6 @@ vect_recog_divmod_pattern (vec<gimple *> *stmts,
       dump_printf_loc (MSG_NOTE, vect_location,
                        "vect_recog_divmod_pattern: detected: ");
       dump_gimple_stmt (MSG_NOTE, TDF_SLIM, pattern_stmt, 0);
-      dump_printf (MSG_NOTE, "\n");
     }
 
   stmts->safe_push (last_stmt);
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index 3de53d1188c690cddc2a95ee4d0dde7628fde004..ec0578922fe5e21ec86a4a29f36d7580672931f3 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -498,7 +498,6 @@ vect_build_slp_tree_1 (vec_info *vinfo,
               dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
 			       "Build SLP failed: unvectorizable statement ");
               dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM, stmt, 0);
-              dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
             }
 	  /* Fatal mismatch.  */
 	  matches[0] = false;
@@ -514,7 +513,6 @@ vect_build_slp_tree_1 (vec_info *vinfo,
 			       "Build SLP failed: not GIMPLE_ASSIGN nor "
 			       "GIMPLE_CALL ");
 	      dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM, stmt, 0);
-              dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
 	    }
 	  /* Fatal mismatch.  */
 	  matches[0] = false;
@@ -570,7 +568,6 @@ vect_build_slp_tree_1 (vec_info *vinfo,
 				   "Build SLP failed: unsupported call type ");
 		  dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM,
 				    call_stmt, 0);
-                  dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
 		}
 	      /* Fatal mismatch.  */
 	      matches[0] = false;
@@ -686,7 +683,6 @@ vect_build_slp_tree_1 (vec_info *vinfo,
 				   "Build SLP failed: different shift "
 				   "arguments in ");
 		  dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM, stmt, 0);
-                  dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
 		}
 	      /* Mismatch.  */
 	      continue;
@@ -707,7 +703,6 @@ vect_build_slp_tree_1 (vec_info *vinfo,
 				       "Build SLP failed: different calls in ");
 		      dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM,
 					stmt, 0);
-                      dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
 		    }
 		  /* Mismatch.  */
 		  continue;
@@ -741,7 +736,6 @@ vect_build_slp_tree_1 (vec_info *vinfo,
 					   "interleaving chains in one node ");
                           dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM,
 					    stmt, 0);
-                          dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
                         }
 		      /* Mismatch.  */
 		      continue;
@@ -761,7 +755,6 @@ vect_build_slp_tree_1 (vec_info *vinfo,
 		  dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, 
 				   "Build SLP failed: not grouped load ");
 		  dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM, stmt, 0);
-                  dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
 		}
 
 	      /* FORNOW: Not grouped loads are not supported.  */
@@ -783,7 +776,6 @@ vect_build_slp_tree_1 (vec_info *vinfo,
 				   "Build SLP failed: operation");
 		  dump_printf (MSG_MISSED_OPTIMIZATION, " unsupported ");
 		  dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM, stmt, 0);
-                  dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
 		}
 	      /* Fatal mismatch.  */
 	      matches[0] = false;
@@ -805,7 +797,6 @@ vect_build_slp_tree_1 (vec_info *vinfo,
 				       " operation");
                       dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM,
 					stmt, 0);
-                      dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
                     }
 		  /* Mismatch.  */
 		  continue;
@@ -1876,7 +1867,6 @@ vect_analyze_slp_instance (vec_info *vinfo,
 				   "permutation ");
 		      dump_gimple_stmt (MSG_MISSED_OPTIMIZATION,
 					TDF_SLIM, stmt, 0);
-                  dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
                 }
               vect_free_slp_instance (new_instance);
               return false;
@@ -3440,7 +3430,6 @@ vect_transform_slp_perm_load (slp_tree node, vec<tree> dr_chain,
 				   "least three vectors ");
 		  dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM,
 				    stmt, 0);
-		  dump_printf (MSG_MISSED_OPTIMIZATION, "\n");
 		}
 	      return false;
 	    }
@@ -3561,7 +3550,6 @@ vect_schedule_slp_instance (slp_tree node, slp_instance instance,
       dump_printf_loc (MSG_NOTE,vect_location,
 		       "------>vectorizing SLP node starting from: ");
       dump_gimple_stmt (MSG_NOTE, TDF_SLIM, stmt, 0);
-      dump_printf (MSG_NOTE, "\n");
     }
 
   /* Vectorized stmts go before the last scalar stmt which is where

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][vectorizer] Remove blank debug lines after dump_gimple_stmt
  2016-06-06 12:46 [PATCH][vectorizer] Remove blank debug lines after dump_gimple_stmt Alan Hayward
@ 2016-06-06 17:57 ` Jeff Law
  2016-06-07 12:21   ` Alan Hayward
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Law @ 2016-06-06 17:57 UTC (permalink / raw)
  To: Alan Hayward, gcc-patches

On 06/06/2016 06:46 AM, Alan Hayward wrote:
> Lots of code calls dump_gimple_stmt then print a newline, however
> dump_gimple_stmt will print a newline itself. This makes the vectorizer
> debug
> file messy. I think the confusion is because dump_generic_expr does NOT
> print a
> newline. This patch removes all prints of a newline direcly after a
> dump_gimple_stmt.
>
> Tested by examining a selection of vect dump files.
>
> 	gcc/
> 	\* tree-vect-data-refs.c (vect_analyze_data_refs): Remove debug newline.
> 	\* tree-vect-loop-manip.c (slpeel_make_loop_iterate_ntimes): likewise.
> 	(vect_can_advance_ivs_p): likewise.
> 	(vect_update_ivs_after_vectorizer): likewise.
> 	\* tree-vect-loop.c (vect_determine_vectorization_factor): likewise.
> 	(vect_analyze_scalar_cycles_1): likewise.
> 	(vect_analyze_loop_operations): likewise.
> 	(report_vect_op): likewise.
> 	(vect_is_slp_reduction): likewise.
> 	(vect_is_simple_reduction): likewise.
> 	(get_initial_def_for_induction): likewise.
> 	(vect_transform_loop): likewise.
> 	\* tree-vect-patterns.c (vect_recog_dot_prod_pattern): likewise.
> 	(vect_recog_sad_pattern): likewise.
> 	(vect_recog_widen_sum_pattern): likewise.
> 	(vect_recog_widening_pattern): likewise.
> 	(vect_recog_divmod_pattern): likewise.
> 	\* tree-vect-slp.c (vect-build-slp_tree_1): likewise.
> 	(vect_analyze_slp_instance): likewise.
> 	(vect_transform_slp_perm_load): likewise.
> 	(vect_schedule_slp_instance): likewise.
Wouldn't you also need to verify that the testsuite passes since it 
could potentially have tests which assume the extra newlines in the 
test's regexps?

So I'm fine with this patch once the testsuite has been verified to run 
without regressions on a target which exercises the vectorizer.

jeff

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][vectorizer] Remove blank debug lines after dump_gimple_stmt
  2016-06-06 17:57 ` Jeff Law
@ 2016-06-07 12:21   ` Alan Hayward
  0 siblings, 0 replies; 3+ messages in thread
From: Alan Hayward @ 2016-06-07 12:21 UTC (permalink / raw)
  To: Jeff Law, gcc-patches


On 06/06/2016 18:56, "Jeff Law" <law@redhat.com> wrote:

>On 06/06/2016 06:46 AM, Alan Hayward wrote:
>> Lots of code calls dump_gimple_stmt then print a newline, however
>> dump_gimple_stmt will print a newline itself. This makes the vectorizer
>> debug
>> file messy. I think the confusion is because dump_generic_expr does NOT
>> print a
>> newline. This patch removes all prints of a newline direcly after a
>> dump_gimple_stmt.
>>
>> Tested by examining a selection of vect dump files.
>>
>> 	gcc/
>> 	\* tree-vect-data-refs.c (vect_analyze_data_refs): Remove debug
>>newline.
>> 	\* tree-vect-loop-manip.c (slpeel_make_loop_iterate_ntimes): likewise.
>> 	(vect_can_advance_ivs_p): likewise.
>> 	(vect_update_ivs_after_vectorizer): likewise.
>> 	\* tree-vect-loop.c (vect_determine_vectorization_factor): likewise.
>> 	(vect_analyze_scalar_cycles_1): likewise.
>> 	(vect_analyze_loop_operations): likewise.
>> 	(report_vect_op): likewise.
>> 	(vect_is_slp_reduction): likewise.
>> 	(vect_is_simple_reduction): likewise.
>> 	(get_initial_def_for_induction): likewise.
>> 	(vect_transform_loop): likewise.
>> 	\* tree-vect-patterns.c (vect_recog_dot_prod_pattern): likewise.
>> 	(vect_recog_sad_pattern): likewise.
>> 	(vect_recog_widen_sum_pattern): likewise.
>> 	(vect_recog_widening_pattern): likewise.
>> 	(vect_recog_divmod_pattern): likewise.
>> 	\* tree-vect-slp.c (vect-build-slp_tree_1): likewise.
>> 	(vect_analyze_slp_instance): likewise.
>> 	(vect_transform_slp_perm_load): likewise.
>> 	(vect_schedule_slp_instance): likewise.
>Wouldn't you also need to verify that the testsuite passes since it
>could potentially have tests which assume the extra newlines in the
>test's regexps?
>
>So I'm fine with this patch once the testsuite has been verified to run
>without regressions on a target which exercises the vectorizer.
>

Sorry, I should have said that I have done a check run on x86 and aarch64,
and there were no regressions.


Alan.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-07 12:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-06 12:46 [PATCH][vectorizer] Remove blank debug lines after dump_gimple_stmt Alan Hayward
2016-06-06 17:57 ` Jeff Law
2016-06-07 12:21   ` Alan Hayward

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).