aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-dfa.c
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2012-08-01 14:58:38 +0000
committerMichael Matz <matz@gcc.gnu.org>2012-08-01 14:58:38 +0000
commit5f564b8f5655167ef3837eb104207705593276dc (patch)
treeb258f1c4ee4a258d4f7b57723cea0c69efca904c /gcc/tree-dfa.c
parent3cfd446903f49d549cc5f1a3ea07497834ece1b1 (diff)
downloadgcc-5f564b8f5655167ef3837eb104207705593276dc.zip
gcc-5f564b8f5655167ef3837eb104207705593276dc.tar.gz
gcc-5f564b8f5655167ef3837eb104207705593276dc.tar.bz2
tree-complex.c (init_parameter_lattice_values): Don't call var_ann.
* 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. From-SVN: r190039
Diffstat (limited to 'gcc/tree-dfa.c')
-rw-r--r--gcc/tree-dfa.c23
1 files changed, 3 insertions, 20 deletions
diff --git a/gcc/tree-dfa.c b/gcc/tree-dfa.c
index 8989a5b..38c4aea 100644
--- a/gcc/tree-dfa.c
+++ b/gcc/tree-dfa.c
@@ -46,7 +46,6 @@ along with GCC; see the file COPYING3. If not see
/* Counters used to display DFA and SSA statistics. */
struct dfa_stats_d
{
- long num_var_anns;
long num_defs;
long num_uses;
long num_phis;
@@ -303,11 +302,6 @@ dump_dfa_stats (FILE *file)
fprintf (file, fmt_str_1, "Referenced variables", (unsigned long)num_referenced_vars,
SCALE (size), LABEL (size));
- size = dfa_stats.num_var_anns * sizeof (struct var_ann_d);
- total += size;
- fprintf (file, fmt_str_1, "Variables annotated", dfa_stats.num_var_anns,
- SCALE (size), LABEL (size));
-
size = dfa_stats.num_uses * sizeof (tree *);
total += size;
fprintf (file, fmt_str_1, "USE operands", dfa_stats.num_uses,
@@ -374,9 +368,6 @@ collect_dfa_stats (struct dfa_stats_d *dfa_stats_p ATTRIBUTE_UNUSED)
memset ((void *)dfa_stats_p, 0, sizeof (struct dfa_stats_d));
- /* Count all the variable annotations. */
- dfa_stats_p->num_var_anns = htab_elements (gimple_referenced_vars (cfun));
-
/* Walk all the statements in the function counting references. */
FOR_EACH_BB (bb)
{
@@ -561,11 +552,7 @@ add_referenced_var_1 (tree var, struct function *fn)
/* Insert VAR into the referenced_vars hash table if it isn't present
and allocate its var-annotation. */
if (referenced_var_check_and_insert (var, fn))
- {
- gcc_checking_assert (!*DECL_VAR_ANN_PTR (var));
- *DECL_VAR_ANN_PTR (var) = ggc_alloc_cleared_var_ann_d ();
- return true;
- }
+ return true;
return false;
}
@@ -576,7 +563,6 @@ add_referenced_var_1 (tree var, struct function *fn)
void
remove_referenced_var (tree var)
{
- var_ann_t v_ann;
struct tree_decl_minimal in;
void **loc;
unsigned int uid = DECL_UID (var);
@@ -587,14 +573,11 @@ remove_referenced_var (tree var)
gcc_checking_assert (!is_global_var (var));
- v_ann = var_ann (var);
- ggc_free (v_ann);
- *DECL_VAR_ANN_PTR (var) = NULL;
-
in.uid = uid;
loc = htab_find_slot_with_hash (gimple_referenced_vars (cfun), &in, uid,
NO_INSERT);
- htab_clear_slot (gimple_referenced_vars (cfun), loc);
+ if (loc)
+ htab_clear_slot (gimple_referenced_vars (cfun), loc);
}