aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 288645b5904..94f025fb2a6 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -2652,8 +2652,6 @@ copy_debug_stmt (gimple stmt, copy_body_data *id)
else if (gimple_debug_source_bind_p (stmt))
{
gimple_debug_source_bind_set_var (stmt, t);
- walk_tree (gimple_debug_source_bind_get_value_ptr (stmt),
- remap_gimple_op_r, &wi, NULL);
/* When inlining and source bind refers to one of the optimized
away parameters, change the source bind into normal debug bind
referring to the corresponding DEBUG_EXPR_DECL that should have
@@ -2677,7 +2675,10 @@ copy_debug_stmt (gimple stmt, copy_body_data *id)
break;
}
}
- }
+ }
+ if (gimple_debug_source_bind_p (stmt))
+ walk_tree (gimple_debug_source_bind_get_value_ptr (stmt),
+ remap_gimple_op_r, &wi, NULL);
}
processing_debug_stmt = 0;
@@ -2785,7 +2786,7 @@ insert_init_debug_bind (copy_body_data *id,
base_stmt = gsi_stmt (gsi);
}
- note = gimple_build_debug_bind (tracked_var, value, base_stmt);
+ note = gimple_build_debug_bind (tracked_var, unshare_expr (value), base_stmt);
if (bb)
{
@@ -3845,7 +3846,7 @@ estimate_num_insns (gimple stmt, eni_weights *weights)
return 0;
else if (is_inexpensive_builtin (decl))
return weights->target_builtin_call_cost;
- else if (DECL_BUILT_IN_CLASS (decl) == BUILT_IN_NORMAL)
+ else if (gimple_call_builtin_p (stmt, BUILT_IN_NORMAL))
{
/* We canonicalize x * x to pow (x, 2.0) with -ffast-math, so
specialize the cheap expansion we do here.