public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5406] Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS."
@ 2021-11-19 14:30 Martin Liska
  0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2021-11-19 14:30 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:79e9f721d1a6f370ce0534745baeeb5a56da948e

commit r12-5406-g79e9f721d1a6f370ce0534745baeeb5a56da948e
Author: Martin Liska <mliska@suse.cz>
Date:   Fri Nov 19 15:29:35 2021 +0100

    Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS."
    
    This reverts commit 206b22d021d94adbaa79e1d443c87415254b15de.

Diff:
---
 gcc/c-family/c-gimplify.c    |  4 ++--
 gcc/c/c-parser.c             |  2 +-
 gcc/cfgexpand.c              |  2 +-
 gcc/cp/parser.c              |  2 +-
 gcc/function.c               |  2 +-
 gcc/gimple-low.c             |  4 ++--
 gcc/gimple-ssa-backprop.c    |  2 +-
 gcc/ipa-param-manipulation.c |  2 +-
 gcc/ipa-split.c              |  6 +++---
 gcc/lto-streamer-in.c        |  4 ++--
 gcc/sese.c                   |  2 +-
 gcc/ssa-iterators.h          |  2 +-
 gcc/tree-cfg.c               |  4 ++--
 gcc/tree-inline.c            |  2 +-
 gcc/tree-loop-distribution.c |  2 +-
 gcc/tree-sra.c               |  2 +-
 gcc/tree-ssa-dce.c           |  2 +-
 gcc/tree-ssa-loop-ivopts.c   |  2 +-
 gcc/tree-ssa-phiopt.c        |  2 +-
 gcc/tree-ssa-reassoc.c       |  2 +-
 gcc/tree-ssa-tail-merge.c    |  2 +-
 gcc/tree-ssa-threadedge.c    |  2 +-
 gcc/tree-ssa.c               | 10 +++++-----
 gcc/tree-ssanames.c          |  2 +-
 gcc/tree-vect-loop-manip.c   |  8 ++++----
 gcc/tree-vect-loop.c         |  4 ++--
 gcc/tree.h                   |  7 ++++++-
 27 files changed, 46 insertions(+), 41 deletions(-)

diff --git a/gcc/c-family/c-gimplify.c b/gcc/c-family/c-gimplify.c
index d9cf051a680..0d38b706f4c 100644
--- a/gcc/c-family/c-gimplify.c
+++ b/gcc/c-family/c-gimplify.c
@@ -295,7 +295,7 @@ genericize_c_loop (tree *stmt_p, location_t start_locus, tree cond, tree body,
   finish_bc_block (&stmt_list, bc_continue, clab);
   if (incr)
     {
-      if (debug_nonbind_markers_p && incr_locus != UNKNOWN_LOCATION)
+      if (MAY_HAVE_DEBUG_MARKER_STMTS && incr_locus != UNKNOWN_LOCATION)
 	{
 	  tree d = build0 (DEBUG_BEGIN_STMT, void_type_node);
 	  SET_EXPR_LOCATION (d, expr_loc_or_loc (incr, start_locus));
@@ -305,7 +305,7 @@ genericize_c_loop (tree *stmt_p, location_t start_locus, tree cond, tree body,
     }
   append_to_statement_list (entry, &stmt_list);
 
-  if (debug_nonbind_markers_p && cond_locus != UNKNOWN_LOCATION)
+  if (MAY_HAVE_DEBUG_MARKER_STMTS && cond_locus != UNKNOWN_LOCATION)
     {
       tree d = build0 (DEBUG_BEGIN_STMT, void_type_node);
       SET_EXPR_LOCATION (d, cond_locus);
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 81eea18dc88..f312630448f 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -1791,7 +1791,7 @@ static void
 add_debug_begin_stmt (location_t loc)
 {
   /* Don't add DEBUG_BEGIN_STMTs outside of functions, see PR84721.  */
-  if (!debug_nonbind_markers_p || !building_stmt_list_p ())
+  if (!MAY_HAVE_DEBUG_MARKER_STMTS || !building_stmt_list_p ())
     return;
 
   tree stmt = build0 (DEBUG_BEGIN_STMT, void_type_node);
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 4e6f776250f..eb6466f4be6 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -6587,7 +6587,7 @@ pass_expand::execute (function *fun)
   timevar_pop (TV_OUT_OF_SSA);
   SA.partition_to_pseudo = XCNEWVEC (rtx, SA.map->num_partitions);
 
-  if (flag_var_tracking_assignments && flag_tree_ter)
+  if (MAY_HAVE_DEBUG_BIND_STMTS && flag_tree_ter)
     {
       gimple_stmt_iterator gsi;
       FOR_EACH_BB_FN (bb, cfun)
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 65f0f112011..aa7f0e4b526 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -11698,7 +11698,7 @@ cp_parser_lambda_body (cp_parser* parser, tree lambda_expr)
 static void
 add_debug_begin_stmt (location_t loc)
 {
-  if (!debug_nonbind_markers_p)
+  if (!MAY_HAVE_DEBUG_MARKER_STMTS)
     return;
   if (DECL_DECLARED_CONCEPT_P (current_function_decl))
     /* A concept is never expanded normally.  */
diff --git a/gcc/function.c b/gcc/function.c
index 1bebe8aaee8..61b3bd036b8 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -4872,7 +4872,7 @@ allocate_struct_function (tree fndecl, bool abstract_p)
      disabled.  The markers make little sense without the variable
      binding annotations among them.  */
   cfun->debug_nonbind_markers = lang_hooks.emits_begin_stmt
-    && debug_nonbind_markers_p;
+    && MAY_HAVE_DEBUG_MARKER_STMTS;
 }
 
 /* This is like allocate_struct_function, but pushes a new cfun for FNDECL
diff --git a/gcc/gimple-low.c b/gcc/gimple-low.c
index 7d9b3df2ffb..7e39c22df44 100644
--- a/gcc/gimple-low.c
+++ b/gcc/gimple-low.c
@@ -114,7 +114,7 @@ lower_function_body (void)
   /* If we had begin stmt markers from e.g. PCH, but this compilation
      doesn't want them, lower_stmt will have cleaned them up; we can
      now clear the flag that indicates we had them.  */
-  if (!debug_nonbind_markers_p && cfun->debug_nonbind_markers)
+  if (!MAY_HAVE_DEBUG_MARKER_STMTS && cfun->debug_nonbind_markers)
     {
       /* This counter needs not be exact, but before lowering it will
 	 most certainly be.  */
@@ -316,7 +316,7 @@ lower_stmt (gimple_stmt_iterator *gsi, struct lower_data *data)
       /* Propagate fallthruness.  */
       /* If the function (e.g. from PCH) had debug stmts, but they're
 	 disabled for this compilation, remove them.  */
-      if (!debug_nonbind_markers_p)
+      if (!MAY_HAVE_DEBUG_MARKER_STMTS)
 	gsi_remove (gsi, true);
       else
 	gsi_next (gsi);
diff --git a/gcc/gimple-ssa-backprop.c b/gcc/gimple-ssa-backprop.c
index 3705c106fcc..4b62bb92a21 100644
--- a/gcc/gimple-ssa-backprop.c
+++ b/gcc/gimple-ssa-backprop.c
@@ -737,7 +737,7 @@ strip_sign_op (tree rhs)
 void
 backprop::prepare_change (tree var)
 {
-  if (flag_var_tracking_assignments)
+  if (MAY_HAVE_DEBUG_BIND_STMTS)
     insert_debug_temp_for_var_def (NULL, var);
   reset_flow_sensitive_info (var);
 }
diff --git a/gcc/ipa-param-manipulation.c b/gcc/ipa-param-manipulation.c
index ba897bb96f2..cec1dba701f 100644
--- a/gcc/ipa-param-manipulation.c
+++ b/gcc/ipa-param-manipulation.c
@@ -832,7 +832,7 @@ ipa_param_adjustments::modify_call (cgraph_edge *cs,
      vector to say for debug info that if parameter parm had been passed,
      it would have value parm_Y(D).  */
   tree old_decl = gimple_call_fndecl (stmt);
-  if (flag_var_tracking_assignments && old_decl && callee_decl)
+  if (MAY_HAVE_DEBUG_BIND_STMTS && old_decl && callee_decl)
     {
       vec<tree, va_gc> **debug_args = NULL;
       unsigned i = 0;
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c
index 65377678557..c68577d04a9 100644
--- a/gcc/ipa-split.c
+++ b/gcc/ipa-split.c
@@ -1465,7 +1465,7 @@ split_function (basic_block return_bb, class split_point *split_point,
     {
       vec<tree, va_gc> **debug_args = NULL;
       unsigned i = 0, len = 0;
-      if (flag_var_tracking_assignments)
+      if (MAY_HAVE_DEBUG_BIND_STMTS)
 	{
 	  debug_args = decl_debug_args_lookup (node->decl);
 	  if (debug_args)
@@ -1479,11 +1479,11 @@ split_function (basic_block return_bb, class split_point *split_point,
 	    gimple *def_temp;
 
 	    /* This needs to be done even without
-	       flag_var_tracking_assignments, otherwise if it didn't exist
+	       MAY_HAVE_DEBUG_BIND_STMTS, otherwise if it didn't exist
 	       before, we'd end up with different SSA_NAME_VERSIONs
 	       between -g and -g0.  */
 	    arg = get_or_create_ssa_default_def (cfun, parm);
-	    if (!flag_var_tracking_assignments || debug_args == NULL)
+	    if (!MAY_HAVE_DEBUG_BIND_STMTS || debug_args == NULL)
 	      continue;
 
 	    while (i < len && (**debug_args)[i] != DECL_ORIGIN (parm))
diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c
index 4165892d466..eb8a7dc57b0 100644
--- a/gcc/lto-streamer-in.c
+++ b/gcc/lto-streamer-in.c
@@ -1454,8 +1454,8 @@ input_function (tree fn_decl, class data_in *data_in,
 	    {
 	      if (is_gimple_debug (stmt)
 		  && (gimple_debug_nonbind_marker_p (stmt)
-		      ? !debug_nonbind_markers_p
-		      : !flag_var_tracking_assignments))
+		      ? !MAY_HAVE_DEBUG_MARKER_STMTS
+		      : !MAY_HAVE_DEBUG_BIND_STMTS))
 		remove = true;
 	      /* In case the linemap overflows locations can be dropped
 		 to zero.  Thus do not keep nonsensical inline entry markers
diff --git a/gcc/sese.c b/gcc/sese.c
index 5ddbb0b9532..ca88f9bbfdf 100644
--- a/gcc/sese.c
+++ b/gcc/sese.c
@@ -205,7 +205,7 @@ void
 sese_insert_phis_for_liveouts (sese_info_p region, basic_block bb,
 			       edge false_e, edge true_e)
 {
-  if (flag_var_tracking_assignments)
+  if (MAY_HAVE_DEBUG_BIND_STMTS)
     sese_reset_debug_liveouts (region);
 
   unsigned i;
diff --git a/gcc/ssa-iterators.h b/gcc/ssa-iterators.h
index 3e26ce051bf..f70b0a42368 100644
--- a/gcc/ssa-iterators.h
+++ b/gcc/ssa-iterators.h
@@ -456,7 +456,7 @@ num_imm_uses (const_tree var)
   const ssa_use_operand_t *ptr;
   unsigned int num = 0;
 
-  if (!flag_var_tracking_assignments)
+  if (!MAY_HAVE_DEBUG_BIND_STMTS)
     {
       for (ptr = start->next; ptr != start; ptr = ptr->next)
 	if (USE_STMT (ptr))
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index cde606e1a40..8ed8c69b5b1 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -614,7 +614,7 @@ make_blocks (gimple_seq seq)
      latest (earliest we find) label, and moving debug stmts that are
      not separated from it by nondebug nonlabel stmts after the
      label.  */
-  if (debug_nonbind_markers_p)
+  if (MAY_HAVE_DEBUG_MARKER_STMTS)
     {
       gimple_stmt_iterator label = gsi_none ();
 
@@ -2139,7 +2139,7 @@ gimple_merge_blocks (basic_block a, basic_block b)
 		gsi_insert_before (&dest_gsi, stmt, GSI_NEW_STMT);
 	    }
 	  /* Other user labels keep around in a form of a debug stmt.  */
-	  else if (!DECL_ARTIFICIAL (label) && flag_var_tracking_assignments)
+	  else if (!DECL_ARTIFICIAL (label) && MAY_HAVE_DEBUG_BIND_STMTS)
 	    {
 	      gimple *dbg = gimple_build_debug_bind (label,
 						     integer_zero_node,
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index a483b9b8fb2..8c108d8e4e7 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -6432,7 +6432,7 @@ tree_function_versioning (tree old_decl, tree new_decl,
 	}
     }
 
-  if (param_body_adjs && flag_var_tracking_assignments)
+  if (param_body_adjs && MAY_HAVE_DEBUG_BIND_STMTS)
     {
       vec<tree, va_gc> **debug_args = NULL;
       unsigned int len = 0;
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index 1f2d0329b5e..583c01a42d8 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -1000,7 +1000,7 @@ generate_loops_for_partition (class loop *loop, partition *partition,
   /* Remove stmts not in the PARTITION bitmap.  */
   bbs = get_loop_body_in_dom_order (loop);
 
-  if (flag_var_tracking_assignments)
+  if (MAY_HAVE_DEBUG_BIND_STMTS)
     for (i = 0; i < loop->num_nodes; i++)
       {
 	basic_block bb = bbs[i];
diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index 10acd5e137b..76e3aae405c 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -2588,7 +2588,7 @@ analyze_access_subtree (struct access *root, struct access *parent,
 	  gcc_checking_assert (!root->grp_scalar_read
 			       && !root->grp_assignment_read);
 	  sth_created = true;
-	  if (flag_var_tracking_assignments)
+	  if (MAY_HAVE_DEBUG_BIND_STMTS)
 	    {
 	      root->grp_to_be_debug_replaced = 1;
 	      root->replacement_decl = create_access_replacement (root);
diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c
index 27aa74fd298..dbf02c434de 100644
--- a/gcc/tree-ssa-dce.c
+++ b/gcc/tree-ssa-dce.c
@@ -1143,7 +1143,7 @@ remove_dead_stmt (gimple_stmt_iterator *i, basic_block bb,
 
   /* If this is a store into a variable that is being optimized away,
      add a debug bind stmt if possible.  */
-  if (flag_var_tracking_assignments
+  if (MAY_HAVE_DEBUG_BIND_STMTS
       && gimple_assign_single_p (stmt)
       && is_gimple_val (gimple_assign_rhs1 (stmt)))
     {
diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c
index 2dad54d90ad..5a7fd305d91 100644
--- a/gcc/tree-ssa-loop-ivopts.c
+++ b/gcc/tree-ssa-loop-ivopts.c
@@ -7670,7 +7670,7 @@ remove_unused_ivs (struct ivopts_data *data, bitmap toremove)
 
 	  tree def = info->iv->ssa_name;
 
-	  if (flag_var_tracking_assignments && SSA_NAME_DEF_STMT (def))
+	  if (MAY_HAVE_DEBUG_BIND_STMTS && SSA_NAME_DEF_STMT (def))
 	    {
 	      imm_use_iterator imm_iter;
 	      use_operand_p use_p;
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c
index 1abc4ea21cc..2fa7069f824 100644
--- a/gcc/tree-ssa-phiopt.c
+++ b/gcc/tree-ssa-phiopt.c
@@ -2406,7 +2406,7 @@ spaceship_replacement (basic_block cond_bb, basic_block middle_bb,
     }
   update_stmt (use_stmt);
 
-  if (flag_var_tracking_assignments)
+  if (MAY_HAVE_DEBUG_BIND_STMTS)
     {
       use_operand_p use_p;
       imm_use_iterator iter;
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index 5c748ad83b4..65316223047 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
@@ -233,7 +233,7 @@ reassoc_remove_stmt (gimple_stmt_iterator *gsi)
 {
   gimple *stmt = gsi_stmt (*gsi);
 
-  if (!flag_var_tracking_assignments || gimple_code (stmt) == GIMPLE_PHI)
+  if (!MAY_HAVE_DEBUG_BIND_STMTS || gimple_code (stmt) == GIMPLE_PHI)
     return gsi_remove (gsi, true);
 
   gimple_stmt_iterator prev = *gsi;
diff --git a/gcc/tree-ssa-tail-merge.c b/gcc/tree-ssa-tail-merge.c
index 5487679e01d..48f94217d16 100644
--- a/gcc/tree-ssa-tail-merge.c
+++ b/gcc/tree-ssa-tail-merge.c
@@ -1796,7 +1796,7 @@ tail_merge_optimize (unsigned int todo)
 
   if (nr_bbs_removed_total > 0)
     {
-      if (flag_var_tracking_assignments)
+      if (MAY_HAVE_DEBUG_BIND_STMTS)
 	{
 	  calculate_dominance_info (CDI_DOMINATORS);
 	  update_debug_stmts ();
diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c
index 813137ec6da..891c62aaf85 100644
--- a/gcc/tree-ssa-threadedge.c
+++ b/gcc/tree-ssa-threadedge.c
@@ -645,7 +645,7 @@ jump_threader::simplify_control_stmt_condition_1
 void
 propagate_threaded_block_debug_into (basic_block dest, basic_block src)
 {
-  if (!flag_var_tracking_assignments)
+  if (!MAY_HAVE_DEBUG_BIND_STMTS)
     return;
 
   if (!single_pred_p (dest))
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index ab5e91526e1..1565e21d983 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -220,7 +220,7 @@ flush_pending_stmts (edge e)
 void
 gimple_replace_ssa_lhs (gimple *stmt, tree nlhs)
 {
-  if (flag_var_tracking_assignments)
+  if (MAY_HAVE_DEBUG_BIND_STMTS)
     {
       tree lhs = gimple_get_lhs (stmt);
 
@@ -242,7 +242,7 @@ gimple_replace_ssa_lhs (gimple *stmt, tree nlhs)
 tree
 target_for_debug_bind (tree var)
 {
-  if (!flag_var_tracking_assignments)
+  if (!MAY_HAVE_DEBUG_BIND_STMTS)
     return NULL_TREE;
 
   if (TREE_CODE (var) == SSA_NAME)
@@ -307,7 +307,7 @@ insert_debug_temp_for_var_def (gimple_stmt_iterator *gsi, tree var)
   int usecount = 0;
   tree value = NULL;
 
-  if (!flag_var_tracking_assignments)
+  if (!MAY_HAVE_DEBUG_BIND_STMTS)
     return;
 
   /* If this name has already been registered for replacement, do nothing
@@ -499,7 +499,7 @@ insert_debug_temps_for_defs (gimple_stmt_iterator *gsi)
   ssa_op_iter op_iter;
   def_operand_p def_p;
 
-  if (!flag_var_tracking_assignments)
+  if (!MAY_HAVE_DEBUG_BIND_STMTS)
     return;
 
   stmt = gsi_stmt (*gsi);
@@ -525,7 +525,7 @@ reset_debug_uses (gimple *stmt)
   imm_use_iterator imm_iter;
   gimple *use_stmt;
 
-  if (!flag_var_tracking_assignments)
+  if (!MAY_HAVE_DEBUG_BIND_STMTS)
     return;
 
   FOR_EACH_PHI_OR_STMT_DEF (def_p, stmt, op_iter, SSA_OP_DEF)
diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c
index eceb51a08ac..f427c5a789b 100644
--- a/gcc/tree-ssanames.c
+++ b/gcc/tree-ssanames.c
@@ -560,7 +560,7 @@ release_ssa_name_fn (struct function *fn, tree var)
       int saved_ssa_name_version = SSA_NAME_VERSION (var);
       use_operand_p imm = &(SSA_NAME_IMM_USE_NODE (var));
 
-      if (flag_var_tracking_assignments)
+      if (MAY_HAVE_DEBUG_BIND_STMTS)
 	insert_debug_temp_for_var_def (NULL, var);
 
       if (flag_checking)
diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c
index 6d132553b06..f788deb3d72 100644
--- a/gcc/tree-vect-loop-manip.c
+++ b/gcc/tree-vect-loop-manip.c
@@ -201,7 +201,7 @@ adjust_debug_stmts_now (adjust_info *ai)
 static void
 adjust_vec_debug_stmts (void)
 {
-  if (!flag_var_tracking_assignments)
+  if (!MAY_HAVE_DEBUG_BIND_STMTS)
     return;
 
   gcc_assert (adjust_vec.exists ());
@@ -223,7 +223,7 @@ adjust_debug_stmts (tree from, tree to, basic_block bb)
 {
   adjust_info ai;
 
-  if (flag_var_tracking_assignments
+  if (MAY_HAVE_DEBUG_BIND_STMTS
       && TREE_CODE (from) == SSA_NAME
       && ! SSA_NAME_IS_DEFAULT_DEF (from)
       && ! virtual_operand_p (from))
@@ -251,7 +251,7 @@ adjust_phi_and_debug_stmts (gimple *update_phi, edge e, tree new_def)
 
   SET_PHI_ARG_DEF (update_phi, e->dest_idx, new_def);
 
-  if (flag_var_tracking_assignments)
+  if (MAY_HAVE_DEBUG_BIND_STMTS)
     adjust_debug_stmts (orig_def, PHI_RESULT (update_phi),
 			gimple_bb (update_phi));
 }
@@ -2696,7 +2696,7 @@ vect_do_peeling (loop_vec_info loop_vinfo, tree niters, tree nitersm1,
       vop_to_rename = create_lcssa_for_virtual_phi (orig_loop);
     }
 
-  if (flag_var_tracking_assignments)
+  if (MAY_HAVE_DEBUG_BIND_STMTS)
     {
       gcc_assert (!adjust_vec.exists ());
       adjust_vec.create (32);
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index f305d545c9a..73efdb96bad 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -9228,7 +9228,7 @@ vect_transform_loop_stmt (loop_vec_info loop_vinfo, stmt_vec_info stmt_info,
     dump_printf_loc (MSG_NOTE, vect_location,
 		     "------>vectorizing statement: %G", stmt_info->stmt);
 
-  if (flag_var_tracking_assignments && !STMT_VINFO_LIVE_P (stmt_info))
+  if (MAY_HAVE_DEBUG_BIND_STMTS && !STMT_VINFO_LIVE_P (stmt_info))
     vect_loop_kill_debug_uses (loop, stmt_info);
 
   if (!STMT_VINFO_RELEVANT_P (stmt_info)
@@ -9602,7 +9602,7 @@ vect_transform_loop (loop_vec_info loop_vinfo, gimple *loop_vectorized_call)
 	  if (!stmt_info)
 	    continue;
 
-	  if (flag_var_tracking_assignments && !STMT_VINFO_LIVE_P (stmt_info))
+	  if (MAY_HAVE_DEBUG_BIND_STMTS && !STMT_VINFO_LIVE_P (stmt_info))
 	    vect_loop_kill_debug_uses (loop, stmt_info);
 
 	  if (!STMT_VINFO_RELEVANT_P (stmt_info)
diff --git a/gcc/tree.h b/gcc/tree.h
index 76d96c3dc76..03719b18c67 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1174,9 +1174,14 @@ extern void omp_clause_range_check_failed (const_tree, const char *, int,
 #define VL_EXP_OPERAND_LENGTH(NODE) \
   ((int)TREE_INT_CST_LOW (VL_EXP_CHECK (NODE)->exp.operands[0]))
 
+/* Nonzero if gimple_debug_nonbind_marker_p() may possibly hold.  */
+#define MAY_HAVE_DEBUG_MARKER_STMTS debug_nonbind_markers_p
+/* Nonzero if gimple_debug_bind_p() (and thus
+   gimple_debug_source_bind_p()) may possibly hold.  */
+#define MAY_HAVE_DEBUG_BIND_STMTS flag_var_tracking_assignments
 /* Nonzero if is_gimple_debug() may possibly hold.  */
 #define MAY_HAVE_DEBUG_STMTS					\
-  (debug_nonbind_markers_p || flag_var_tracking_assignments)
+  (MAY_HAVE_DEBUG_MARKER_STMTS || MAY_HAVE_DEBUG_BIND_STMTS)
 
 /* In a LOOP_EXPR node.  */
 #define LOOP_EXPR_BODY(NODE) TREE_OPERAND_CHECK_CODE (NODE, LOOP_EXPR, 0)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-19 14:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-19 14:30 [gcc r12-5406] Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS." Martin Liska

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).