aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2012-08-01 14:58:38 +0000
committerMichael Matz <matz@suse.de>2012-08-01 14:58:38 +0000
commit581c60eb12a613cb642ed0fb3a42bf27dd7a79b9 (patch)
treeb258f1c4ee4a258d4f7b57723cea0c69efca904c /gcc/tree-inline.c
parentbed76b9a906b544a23845843d7138166098da720 (diff)
* tree-complex.c (init_parameter_lattice_values): Don't call var_ann.
* tree-dfa.c (struct dfa_stats_d): Remove num_var_anns member. (dump_dfa_stats): Don't dump stats about var anns. (collect_dfa_stats): Don't collect them. (add_referenced_var_1): Don't set var annotation pointers. (remove_referenced_var): Ditto, and only remove it it's in the hash table. * tree-flow-inline.h (var_ann): Remove. * tree-flow.h (struct var_ann_d, var_ann_t): Remove. * tree-inline.c (remapped_type): Remove. (can_be_nonlocal): Most variable will be considered live here, return false earlier. (remap_decls): Don't call var_ann, all variables will be considered referenced here. (copy_debug_stmt): Ditto, and use is_global_var. * tree-into-ssa.c (rewrite_debug_stmt_uses): Use get_current_def to determine if a variable was referred to, not var_ann. * tree-ssa-live.c (remove_unused_scope_block_p): Don't check var_ann. (remove_unused_locals): Ditto. * tree-ssa.c (delete_tree_ssa): Don't free/clear var ann pointers. * tree-tailcall.c (arg_needs_copy_p): Don't check var_ann. * tree.c (copy_node_stat): Don't clear var ann pointer. * tree.h (tree_result_decl, tree_parm_decl, tree_var_decl): Remove ann member. (DECL_VAR_ANN_PTR): Remove. * tree-flow.h (struct var_ann_d): Rename used member. (set_is_used): Don't declare. * tree-flow-inline.h (clear_is_used): Remove. (set_is_used, is_used_p): Move to ... * tree-ssa-live.c (set_is_used, is_used_p): ... here, and use on the side bitmap. (usedvars): New bitmap. (dump_scope_block): Don't dump unusedness. (remove_unused_locals): Allocate and free usedvars. * tree-nrv.c (tree_nrv): Don't clear used flags here. * tree-flow.h (struct var_ann_d): Remove base_var_processed and base_index members. * tree-ssa-live.h (struct _var_map): Remove basevars member. (VAR_ANN_BASE_INDEX): Remove. * tree-ssa-live.c (var_map_base_init): Use a hash table instead of var annotation to compress index space. Don't deal with above removed members. (var_map_base_fini): Don't free basevars. (init_var_map): Don't clear basevars. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@190039 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c52
1 files changed, 6 insertions, 46 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 7a9b7e0db9b..6c052535626 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -501,26 +501,6 @@ remap_type (tree type, copy_body_data *id)
return tmp;
}
-/* Return previously remapped type of TYPE in ID. Return NULL if TYPE
- is NULL or TYPE has not been remapped before. */
-
-static tree
-remapped_type (tree type, copy_body_data *id)
-{
- tree *node;
-
- if (type == NULL)
- return type;
-
- /* See if we have remapped this type. */
- node = (tree *) pointer_map_contains (id->decl_map, type);
- if (node)
- return *node;
- else
- return NULL;
-}
-
- /* The type only needs remapping if it's variably modified. */
/* Decide if DECL can be put into BLOCK_NONLOCAL_VARs. */
static bool
@@ -536,26 +516,7 @@ can_be_nonlocal (tree decl, copy_body_data *id)
&& !auto_var_in_fn_p (decl, id->src_fn))
return true;
- /* At the moment dwarf2out can handle only these types of nodes. We
- can support more later. */
- if (TREE_CODE (decl) != VAR_DECL && TREE_CODE (decl) != PARM_DECL)
- return false;
-
- /* We must use global type. We call remapped_type instead of
- remap_type since we don't want to remap this type here if it
- hasn't been remapped before. */
- if (TREE_TYPE (decl) != remapped_type (TREE_TYPE (decl), id))
- return false;
-
- /* Wihtout SSA we can't tell if variable is used. */
- if (!gimple_in_ssa_p (cfun))
- return false;
-
- /* Live variables must be copied so we can attach DECL_RTL. */
- if (var_ann (decl))
- return false;
-
- return true;
+ return false;
}
static tree
@@ -571,9 +532,10 @@ remap_decls (tree decls, VEC(tree,gc) **nonlocalized_list, copy_body_data *id)
if (can_be_nonlocal (old_var, id))
{
+ /* We need to add this variable to the local decls as otherwise
+ nothing else will do so. */
if (TREE_CODE (old_var) == VAR_DECL
- && ! DECL_EXTERNAL (old_var)
- && (var_ann (old_var) || !gimple_in_ssa_p (cfun)))
+ && ! DECL_EXTERNAL (old_var))
add_local_decl (cfun, old_var);
if ((!optimize || debug_info_level > DINFO_LEVEL_TERSE)
&& !DECL_IGNORED_P (old_var)
@@ -2371,10 +2333,8 @@ copy_debug_stmt (gimple stmt, copy_body_data *id)
t = *n;
}
else if (TREE_CODE (t) == VAR_DECL
- && !TREE_STATIC (t)
- && gimple_in_ssa_p (cfun)
- && !pointer_map_contains (id->decl_map, t)
- && !var_ann (t))
+ && !is_global_var (t)
+ && !pointer_map_contains (id->decl_map, t))
/* T is a non-localized variable. */;
else
walk_tree (&t, remap_gimple_op_r, &wi, NULL);