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.c63
1 files changed, 0 insertions, 63 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 6c05253..8ca912e 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -338,17 +338,6 @@ remap_decl (tree decl, copy_body_data *id)
walk_tree (&DECL_QUALIFIER (t), copy_tree_body_r, id, NULL);
}
- if ((TREE_CODE (t) == VAR_DECL
- || TREE_CODE (t) == RESULT_DECL
- || TREE_CODE (t) == PARM_DECL)
- && id->src_fn && DECL_STRUCT_FUNCTION (id->src_fn)
- && gimple_referenced_vars (DECL_STRUCT_FUNCTION (id->src_fn))
- /* We don't want to mark as referenced VAR_DECLs that were
- not marked as such in the src function. */
- && (TREE_CODE (decl) != VAR_DECL
- || referenced_var_lookup (DECL_STRUCT_FUNCTION (id->src_fn),
- DECL_UID (decl))))
- add_referenced_var (t);
return t;
}
@@ -844,14 +833,6 @@ remap_gimple_op_r (tree *tp, int *walk_subtrees, void *data)
if (TREE_CODE (*tp) != OMP_CLAUSE)
TREE_TYPE (*tp) = remap_type (TREE_TYPE (*tp), id);
- /* Global variables we haven't seen yet need to go into referenced
- vars. If not referenced from types only. */
- if (gimple_referenced_vars (cfun)
- && TREE_CODE (*tp) == VAR_DECL && !is_global_var (*tp)
- && id->remapping_type_depth == 0
- && !processing_debug_stmt)
- add_referenced_var (*tp);
-
if (TREE_CODE (*tp) == TARGET_EXPR && TREE_OPERAND (*tp, 3))
{
/* The copied TARGET_EXPR has never been expanded, even if the
@@ -1087,14 +1068,6 @@ copy_tree_body_r (tree *tp, int *walk_subtrees, void *data)
tweak some special cases. */
copy_tree_r (tp, walk_subtrees, NULL);
- /* Global variables we haven't seen yet needs to go into referenced
- vars. If not referenced from types or debug stmts only. */
- if (gimple_referenced_vars (cfun)
- && TREE_CODE (*tp) == VAR_DECL && !is_global_var (*tp)
- && id->remapping_type_depth == 0
- && !processing_debug_stmt)
- add_referenced_var (*tp);
-
/* If EXPR has block defined, map it to newly constructed block.
When inlining we want EXPRs without block appear in the block
of function call if we are not remapping a type. */
@@ -1764,7 +1737,6 @@ copy_bb (copy_body_data *id, basic_block bb, int frequency_scale,
ssa_op_iter i;
tree def;
- find_referenced_vars_in (gsi_stmt (copy_gsi));
FOR_EACH_SSA_TREE_OPERAND (def, stmt, i, SSA_OP_DEF)
if (TREE_CODE (def) == SSA_NAME)
SSA_NAME_DEF_STMT (def) = stmt;
@@ -2558,10 +2530,6 @@ setup_one_parameter (copy_body_data *id, tree p, tree value, tree fn,
function. */
var = copy_decl_to_var (p, id);
- /* We're actually using the newly-created var. */
- if (gimple_in_ssa_p (cfun) && TREE_CODE (var) == VAR_DECL)
- add_referenced_var (var);
-
/* Declare this new variable. */
DECL_CHAIN (var) = *vars;
*vars = var;
@@ -2569,17 +2537,6 @@ setup_one_parameter (copy_body_data *id, tree p, tree value, tree fn,
/* Make gimplifier happy about this variable. */
DECL_SEEN_IN_BIND_EXPR_P (var) = 1;
- /* We are eventually using the value - make sure all variables
- referenced therein are properly recorded. */
- if (value
- && gimple_referenced_vars (cfun)
- && TREE_CODE (value) == ADDR_EXPR)
- {
- tree base = get_base_address (TREE_OPERAND (value, 0));
- if (base && TREE_CODE (base) == VAR_DECL && !is_global_var (base))
- add_referenced_var (base);
- }
-
/* If the parameter is never assigned to, has no SSA_NAMEs created,
we would not need to create a new variable here at all, if it
weren't for debug info. Still, we can just use the argument
@@ -2885,9 +2842,6 @@ declare_return_variable (copy_body_data *id, tree return_slot, tree modify_dest,
gcc_assert (TREE_CODE (TYPE_SIZE_UNIT (callee_type)) == INTEGER_CST);
var = copy_result_decl_to_var (result, id);
- if (gimple_referenced_vars (cfun))
- add_referenced_var (var);
-
DECL_SEEN_IN_BIND_EXPR_P (var) = 1;
/* Do not have the rest of GCC warn about this variable as it should
@@ -2941,8 +2895,6 @@ declare_return_variable (copy_body_data *id, tree return_slot, tree modify_dest,
&& !is_gimple_val (var))
{
tree temp = create_tmp_var (TREE_TYPE (result), "retvalptr");
- if (gimple_referenced_vars (cfun))
- add_referenced_var (temp);
insert_decl_map (id, result, temp);
/* When RESULT_DECL is in SSA form, we need to remap and initialize
it's default_def SSA_NAME. */
@@ -4773,14 +4725,6 @@ copy_decl_for_dup_finish (copy_body_data *id, tree decl, tree copy)
new function. */
DECL_CONTEXT (copy) = id->dst_fn;
- if (TREE_CODE (decl) == VAR_DECL
- /* C++ clones functions during parsing, before
- referenced_vars. */
- && gimple_referenced_vars (DECL_STRUCT_FUNCTION (id->src_fn))
- && referenced_var_lookup (DECL_STRUCT_FUNCTION (id->src_fn),
- DECL_UID (decl)))
- add_referenced_var (copy);
-
return copy;
}
@@ -4894,7 +4838,6 @@ copy_arguments_for_versioning (tree orig_parm, copy_body_data * id,
as temporary variable later in function, the uses will be
replaced by local variable. */
tree var = copy_decl_to_var (arg, id);
- add_referenced_var (var);
insert_decl_map (id, arg, var);
/* Declare this new variable. */
DECL_CHAIN (var) = *vars;
@@ -5175,12 +5118,6 @@ tree_function_versioning (tree old_decl, tree new_decl,
if (TREE_CODE (op) == VIEW_CONVERT_EXPR)
op = TREE_OPERAND (op, 0);
- if (TREE_CODE (op) == ADDR_EXPR)
- {
- op = get_base_address (TREE_OPERAND (op, 0));
- if (op && TREE_CODE (op) == VAR_DECL && !is_global_var (op))
- add_referenced_var (op);
- }
gcc_assert (TREE_CODE (replace_info->old_tree) == PARM_DECL);
init = setup_one_parameter (&id, replace_info->old_tree,
replace_info->new_tree, id.src_fn,