temporary. */
gimple *debugstmt;
tree value = gimple_assign_rhs_to_tree (def);
- tree vexpr = make_node (DEBUG_EXPR_DECL);
+ tree vexpr = build_debug_expr_decl (TREE_TYPE (value));
rtx val;
machine_mode mode;
set_curr_insn_location (gimple_location (def));
- DECL_ARTIFICIAL (vexpr) = 1;
- TREE_TYPE (vexpr) = TREE_TYPE (value);
if (DECL_P (value))
mode = DECL_MODE (value);
else
mode = TYPE_MODE (TREE_TYPE (value));
+ /* FIXME: Is setting the mode really necessary? */
SET_DECL_MODE (vexpr, mode);
val = gen_rtx_VAR_LOCATION
}
if (ddecl == NULL)
{
- ddecl = make_node (DEBUG_EXPR_DECL);
- DECL_ARTIFICIAL (ddecl) = 1;
- TREE_TYPE (ddecl) = TREE_TYPE (origin);
+ ddecl = build_debug_expr_decl (TREE_TYPE (origin));
+ /* FIXME: Is setting the mode really necessary? */
SET_DECL_MODE (ddecl, DECL_MODE (origin));
vec_safe_push (*debug_args, origin);
return;
}
- tree dp_ddecl = make_node (DEBUG_EXPR_DECL);
- DECL_ARTIFICIAL (dp_ddecl) = 1;
- TREE_TYPE (dp_ddecl) = TREE_TYPE (dead_param);
+ tree dp_ddecl = build_debug_expr_decl (TREE_TYPE (dead_param));
+ /* FIXME: Is setting the mode really necessary? */
SET_DECL_MODE (dp_ddecl, DECL_MODE (dead_param));
m_dead_ssa_debug_equiv.put (parm_ddef, dp_ddecl);
}
gcc_assert (is_gimple_debug (stmt));
if (vexpr == NULL && gsip != NULL)
{
- vexpr = make_node (DEBUG_EXPR_DECL);
- def_temp = gimple_build_debug_source_bind (vexpr, decl, NULL);
- DECL_ARTIFICIAL (vexpr) = 1;
- TREE_TYPE (vexpr) = TREE_TYPE (name);
+ vexpr = build_debug_expr_decl (TREE_TYPE (name));
+ /* FIXME: Is setting the mode really necessary? */
SET_DECL_MODE (vexpr, DECL_MODE (decl));
+ def_temp = gimple_build_debug_source_bind (vexpr, decl, NULL);
gsi_insert_before (gsip, def_temp, GSI_SAME_STMT);
}
if (vexpr)
&& id->entry_bb == NULL
&& single_succ_p (ENTRY_BLOCK_PTR_FOR_FN (cfun)))
{
- tree vexpr = make_node (DEBUG_EXPR_DECL);
gimple *def_temp;
gimple_stmt_iterator gsi;
tree val = SSA_NAME_VAR (name);
n = id->decl_map->get (val);
if (n && TREE_CODE (*n) == DEBUG_EXPR_DECL)
return *n;
- def_temp = gimple_build_debug_source_bind (vexpr, val, NULL);
- DECL_ARTIFICIAL (vexpr) = 1;
- TREE_TYPE (vexpr) = TREE_TYPE (name);
+ tree vexpr = build_debug_expr_decl (TREE_TYPE (name));
+ /* FIXME: Is setting the mode really necessary? */
SET_DECL_MODE (vexpr, DECL_MODE (SSA_NAME_VAR (name)));
+ def_temp = gimple_build_debug_source_bind (vexpr, val, NULL);
gsi = gsi_after_labels (single_succ (ENTRY_BLOCK_PTR_FOR_FN (cfun)));
gsi_insert_before (&gsi, def_temp, GSI_SAME_STMT);
insert_decl_map (id, val, vexpr);
debug_args = decl_debug_args_insert (new_decl);
len = vec_safe_length (*debug_args);
}
- ddecl = make_node (DEBUG_EXPR_DECL);
- DECL_ARTIFICIAL (ddecl) = 1;
- TREE_TYPE (ddecl) = TREE_TYPE (parm);
+ ddecl = build_debug_expr_decl (TREE_TYPE (parm));
+ /* FIXME: Is setting the mode really necessary? */
SET_DECL_MODE (ddecl, DECL_MODE (parm));
vec_safe_push (*debug_args, DECL_ORIGIN (parm));
vec_safe_push (*debug_args, ddecl);
vexpr = *d;
if (!vexpr)
{
- vexpr = make_node (DEBUG_EXPR_DECL);
- DECL_ARTIFICIAL (vexpr) = 1;
- TREE_TYPE (vexpr) = TREE_TYPE (parm);
+ vexpr = build_debug_expr_decl (TREE_TYPE (parm));
+ /* FIXME: Is setting the mode really necessary? */
SET_DECL_MODE (vexpr, DECL_MODE (parm));
}
def_temp = gimple_build_debug_bind (var, vexpr, NULL);
if (def == NULL_TREE)
{
gimple *def_temp;
- def = make_node (DEBUG_EXPR_DECL);
- def_temp = gimple_build_debug_source_bind (def, var, NULL);
- DECL_ARTIFICIAL (def) = 1;
- TREE_TYPE (def) = TREE_TYPE (var);
+ def = build_debug_expr_decl (TREE_TYPE (var));
+ /* FIXME: Is setting the mode really necessary? */
SET_DECL_MODE (def, DECL_MODE (var));
+ def_temp = gimple_build_debug_source_bind (def, var, NULL);
gsi =
gsi_after_labels (single_succ (ENTRY_BLOCK_PTR_FOR_FN (cfun)));
gsi_insert_before (&gsi, def_temp, GSI_SAME_STMT);
comp = unshare_expr (comp);
if (count > 1)
{
- tree vexpr = make_node (DEBUG_EXPR_DECL);
- DECL_ARTIFICIAL (vexpr) = 1;
- TREE_TYPE (vexpr) = TREE_TYPE (comp);
+ tree vexpr = build_debug_expr_decl (TREE_TYPE (comp));
+ /* FIXME: Is setting the mode really necessary? */
if (SSA_NAME_VAR (def))
SET_DECL_MODE (vexpr, DECL_MODE (SSA_NAME_VAR (def)));
else
else
{
gdebug *def_temp;
- tree vexpr = make_node (DEBUG_EXPR_DECL);
+ tree vexpr = build_debug_expr_decl (TREE_TYPE (value));
def_temp = gimple_build_debug_bind (vexpr,
unshare_expr (value),
def_stmt);
- DECL_ARTIFICIAL (vexpr) = 1;
- TREE_TYPE (vexpr) = TREE_TYPE (value);
+ /* FIXME: Is setting the mode really necessary? */
if (DECL_P (value))
SET_DECL_MODE (vexpr, DECL_MODE (value));
else