aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2006-11-28 15:42:37 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2006-11-28 14:42:37 +0000
commit5cd4ec7f24ef2fca4e1e27836e5eee7b15b8abd8 (patch)
tree5e09813d89b6e045357e6ee37686e9b16cf2a1ec /gcc/tree-ssa.c
parent3faa49284198625952a4420b889d5139710dab81 (diff)
downloadgcc-5cd4ec7f24ef2fca4e1e27836e5eee7b15b8abd8.zip
gcc-5cd4ec7f24ef2fca4e1e27836e5eee7b15b8abd8.tar.gz
gcc-5cd4ec7f24ef2fca4e1e27836e5eee7b15b8abd8.tar.bz2
Privatize SSA variables into gimple_df.
* tree-flow-inline.h (gimple_in_ssa_p, gimple_aliases_computed_p, gimple_addressable_vars, gimple_call_clobbered_vars, gimple_referenced_vars, gimple_global_var, gimple_nonlocal_all): New accessors. (first_referenced_var): Update. (mark_stmt_modified): Update. (is_call_clobbered): Update. (mark_call_clobbered): Update. (clear_call_clobbered): Update. (mark_non_addressable): Update. * tree-vrp.c (get_value_range): Update. * tree-into-ssa.c (in_ssa_p): Kill. (get_default_def_for): Update. (rewrite_into_ssa): Update. * tree-complex.c (init_parameter_lattice_values): Update. (update_complex_assignment): Update. (update_parameter_components): Update. (expand_complex_libcall): Update. (expand_complex_operations_1): Update. * tree-tailcall.c (arg_needs_copy_p): Update. (add_virtual_phis): Update. (tree_optimize_tail_calls_1): Update. * tree-ssa-dse.c (memory_ssa_name_same): Update. * tree-ssa-copyrename.c (copy_rename_partition_coalesce): Update. * tree-ssa-math-opts.c (execute_cse_reciprocals): Update. * tree-ssa-propagate.c (set_rhs): Update. * tree-ssa-alias.c (aliases_computed_p, call_clobbered_vars, addressable_vars, global_var):Kill. (set_initial_properties): Update. (init_alias_info): Update. (finalize_ref_all_pointers): Update. (setup_pointers_and_addressables): Update. (maybe_create_global_var): Update. (create_global_var): Update. (dump_points_to_info): Update. * function.h (struct gimple_df): Forward declare. (struct function): Add GIMPLE_DF field. * gimplify.c (force_gimple_operand): Update. * tree-dfa.c (referenced_vars, default_defs): KIll. (make_rename_temp): Update. (dump_variable): Update. (referenced_var_lookup): Update. (referenced_var_check_and_insert): Update. (default_def): Rename to ... (gimple_default_def): ... this one; accept cfun argument. (set_default_def): Update. * tree-cfgcleanup.c (modified_noreturn_calls): Kill. (cleanup_control_flow): Update. * tree-ssa-pre.c (compute_avail): Update * tree-ssa-live.c (calculate_live_on_entry): Update. * tree-ssa.c (verify_use): Update. (verify_call_clobbering): Update. (verify_call_clobbering): Update. (init_tree_ssa): Update. (delete_tree_ssa): Update. * tree-outof-ssa.c (coalesce_ssa_name): Update. (rewrite_out_of_ssa): Update. * tree-flow.h (gimple_df): New structure collecting dataflow variables. (FREE_SSANAMES, SSANAMES, MODIFIED_NORETURN_CALLS, DEFAULT_DEFS): New private accessors. (in_ssa_p, modified_noreturn_calls, referenced_vars, default_defs, ssa_names, global_var, nonlocal_all, call_clobbered_vars, addressable_vars, aliases_computed_p): Kill. (default_def): Rename to... (gimple_default_def): ... this one. (defaule_def_fn): Kill. (num_referenced_vars, ssa_names, num_ssa_names): Update. * tree-ssa-structalias.c (nonlocal_all): Kill. (get_constraint_exp_from_ssa_var): Update. (create_nonlocal_var): Update. (get_constraint_for): Update. (update_alias_info): Update. (find_global_initializers): Update. (intra_create_variable_infos): Update. (intra_create_variable_infos): (find_what_p_points_to): Update. (init_alias_heapvars): Update. * tree-cfg.c (remove_bb): Update. (gimplify_val): Update. * tree-ssa-reassoc.c (get_rank): Update. (init_reassoc): Update. * tree-ssanames.c: Do not include gt-tree-ssanames.h (ssa_names, free_ssanames): Kill. (init_ssanames): Update. (make_ssa_name): Update. (release_ssa_name): Update. (release_defs): Update. (replace_ssa_name_symbol): Update. * tree-ssa-operands.c (access_can_touch_variable): Update. (add_virtual_operand): Update. (add_call_clobber_ops): Update. (add_call_read_ops): Update. (get_call_expr_operands): Update. (get_asm_expr_operands): Update. From-SVN: r119294
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r--gcc/tree-ssa.c38
1 files changed, 18 insertions, 20 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index b90916f..4914510 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -231,7 +231,7 @@ verify_use (basic_block bb, basic_block def_bb, use_operand_p use_p,
TREE_VISITED (ssa_name) = 1;
if (IS_EMPTY_STMT (SSA_NAME_DEF_STMT (ssa_name))
- && default_def (SSA_NAME_VAR (ssa_name)) == ssa_name)
+ && gimple_default_def (cfun, SSA_NAME_VAR (ssa_name)) == ssa_name)
; /* Default definitions have empty statements. Nothing to do. */
else if (!def_bb)
{
@@ -627,7 +627,7 @@ verify_call_clobbering (void)
that everything in call_clobbered_vars is marked
DECL_CALL_CLOBBERED, and that everything marked
DECL_CALL_CLOBBERED is in call_clobbered_vars. */
- EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, i, bi)
+ EXECUTE_IF_SET_IN_BITMAP (gimple_call_clobbered_vars (cfun), 0, i, bi)
{
var = referenced_var (i);
if (!MTAG_P (var) && !DECL_CALL_CLOBBERED (var))
@@ -640,7 +640,7 @@ verify_call_clobbering (void)
FOR_EACH_REFERENCED_VAR (var, rvi)
{
if (!MTAG_P (var) && DECL_CALL_CLOBBERED (var)
- && !bitmap_bit_p (call_clobbered_vars, DECL_UID (var)))
+ && !bitmap_bit_p (gimple_call_clobbered_vars (cfun), DECL_UID (var)))
{
error ("variable marked DECL_CALL_CLOBBERED but not in call_clobbered_vars bitmap.");
debug_variable (var);
@@ -830,16 +830,16 @@ int_tree_map_hash (const void *item)
void
init_tree_ssa (void)
{
- referenced_vars = htab_create_ggc (20, int_tree_map_hash,
- int_tree_map_eq, NULL);
- default_defs = htab_create_ggc (20, int_tree_map_hash, int_tree_map_eq, NULL);
- call_clobbered_vars = BITMAP_ALLOC (NULL);
- addressable_vars = BITMAP_ALLOC (NULL);
+ cfun->gimple_df = ggc_alloc_cleared (sizeof (struct gimple_df));
+ cfun->gimple_df->referenced_vars = htab_create_ggc (20, int_tree_map_hash,
+ int_tree_map_eq, NULL);
+ cfun->gimple_df->default_defs = htab_create_ggc (20, int_tree_map_hash,
+ int_tree_map_eq, NULL);
+ cfun->gimple_df->call_clobbered_vars = BITMAP_GGC_ALLOC ();
+ cfun->gimple_df->addressable_vars = BITMAP_GGC_ALLOC ();
init_alias_heapvars ();
init_ssanames ();
init_phinodes ();
- global_var = NULL_TREE;
- aliases_computed_p = false;
}
@@ -887,21 +887,19 @@ delete_tree_ssa (void)
ggc_free (var->common.ann);
var->common.ann = NULL;
}
- htab_delete (referenced_vars);
- referenced_vars = NULL;
+ htab_delete (gimple_referenced_vars (cfun));
+ cfun->gimple_df->referenced_vars = NULL;
fini_ssanames ();
fini_phinodes ();
- global_var = NULL_TREE;
+ cfun->gimple_df->global_var = NULL_TREE;
- htab_delete (default_defs);
- BITMAP_FREE (call_clobbered_vars);
- call_clobbered_vars = NULL;
- BITMAP_FREE (addressable_vars);
- addressable_vars = NULL;
- modified_noreturn_calls = NULL;
- aliases_computed_p = false;
+ htab_delete (cfun->gimple_df->default_defs);
+ cfun->gimple_df->call_clobbered_vars = NULL;
+ cfun->gimple_df->addressable_vars = NULL;
+ cfun->gimple_df->modified_noreturn_calls = NULL;
+ cfun->gimple_df->aliases_computed_p = false;
delete_alias_heapvars ();
gcc_assert (!need_ssa_update_p ());
}