Revert "Remove MAY_HAVE_DEBUG_MARKER_STMTS and MAY_HAVE_DEBUG_BIND_STMTS."
This reverts commit 206b22d021
.
This commit is contained in:
parent
c7381debe4
commit
79e9f721d1
27 changed files with 46 additions and 41 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)))
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 ();
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue