diff options
author | Jan Hubicka <jh@suse.cz> | 2006-11-28 15:42:37 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2006-11-28 14:42:37 +0000 |
commit | 5cd4ec7f24ef2fca4e1e27836e5eee7b15b8abd8 (patch) | |
tree | 5e09813d89b6e045357e6ee37686e9b16cf2a1ec /gcc/tree-ssa-structalias.c | |
parent | 3faa49284198625952a4420b889d5139710dab81 (diff) | |
download | gcc-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-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 4354b44..30769ec 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -165,9 +165,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA static GTY ((if_marked ("tree_map_marked_p"), param_is (struct tree_map))) htab_t heapvar_for_stmt; -/* One variable to represent all non-local accesses. */ -tree nonlocal_all; - static bool use_field_sensitive = true; static int in_ipa_mode = 0; static bitmap_obstack predbitmap_obstack; @@ -1836,7 +1833,7 @@ get_constraint_exp_from_ssa_var (tree t) decl. */ if (TREE_CODE (t) == SSA_NAME && TREE_CODE (SSA_NAME_VAR (t)) == PARM_DECL - && default_def (SSA_NAME_VAR (t)) == t) + && gimple_default_def (cfun, SSA_NAME_VAR (t)) == t) return get_constraint_exp_from_ssa_var (SSA_NAME_VAR (t)); cexpr.type = SCALAR; @@ -2101,7 +2098,7 @@ create_nonlocal_var (tree type) { tree nonlocal = create_tmp_var_raw (type, "NONLOCAL"); - if (referenced_vars) + if (gimple_referenced_vars (cfun)) add_referenced_var (nonlocal); DECL_EXTERNAL (nonlocal) = 1; @@ -2224,7 +2221,7 @@ get_constraint_for (tree t, VEC (ce_s, heap) **results) heapvar = create_tmp_var_raw (ptr_type_node, "HEAP"); DECL_EXTERNAL (heapvar) = 1; get_var_ann (heapvar)->is_heapvar = 1; - if (referenced_vars) + if (gimple_referenced_vars (cfun)) add_referenced_var (heapvar); heapvar_insert (t, heapvar); } @@ -2659,7 +2656,7 @@ update_alias_info (tree stmt, struct alias_info *ai) addr_taken = addresses_taken (stmt); if (addr_taken) { - bitmap_ior_into (addressable_vars, addr_taken); + bitmap_ior_into (gimple_addressable_vars (cfun), addr_taken); /* If STMT is an escape point, all the addresses taken by it are call-clobbered. */ @@ -2695,7 +2692,10 @@ update_alias_info (tree stmt, struct alias_info *ai) to the set of addressable variables. */ if (TREE_CODE (op) == ADDR_EXPR) { + bitmap addressable_vars = gimple_addressable_vars (cfun); + gcc_assert (TREE_CODE (stmt) == PHI_NODE); + gcc_assert (addressable_vars); /* PHI nodes don't have annotations for pinning the set of addresses taken, so we collect them here. @@ -2704,7 +2704,8 @@ update_alias_info (tree stmt, struct alias_info *ai) so that they can be treated like regular statements? Currently, they are treated as second-class statements. */ - add_to_addressable_set (TREE_OPERAND (op, 0), &addressable_vars); + add_to_addressable_set (TREE_OPERAND (op, 0), + &addressable_vars); continue; } @@ -3608,7 +3609,7 @@ find_global_initializers (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED, case VAR_DECL: /* We might not have walked this because we skip DECL_EXTERNALs during the initial scan. */ - if (referenced_vars) + if (gimple_referenced_vars (cfun)) { get_var_ann (t); if (referenced_var_check_and_insert (t)) @@ -3867,7 +3868,7 @@ intra_create_variable_infos (void) "PARM_NOALIAS"); get_var_ann (heapvar)->is_heapvar = 1; DECL_EXTERNAL (heapvar) = 1; - if (referenced_vars) + if (gimple_referenced_vars (cfun)) add_referenced_var (heapvar); heapvar_insert (t, heapvar); } @@ -3891,13 +3892,14 @@ intra_create_variable_infos (void) make_constraint_from_escaped (p); } } - if (!nonlocal_all) - nonlocal_all = create_nonlocal_var (void_type_node); + if (!gimple_nonlocal_all (cfun)) + cfun->gimple_df->nonlocal_all = create_nonlocal_var (void_type_node); /* Create variable info for the nonlocal var if it does not exist. */ - nonlocal_vars_id = create_variable_info_for (nonlocal_all, - get_name (nonlocal_all)); + nonlocal_vars_id = create_variable_info_for (gimple_nonlocal_all (cfun), + get_name (gimple_nonlocal_all + (cfun))); nonlocal_vi = get_varinfo (nonlocal_vars_id); nonlocal_vi->is_artificial_var = 1; nonlocal_vi->is_heap_var = 1; @@ -3999,7 +4001,7 @@ find_what_p_points_to (tree p) decl. */ if (TREE_CODE (p) == SSA_NAME && TREE_CODE (SSA_NAME_VAR (p)) == PARM_DECL - && default_def (SSA_NAME_VAR (p)) == p) + && gimple_default_def (cfun, SSA_NAME_VAR (p)) == p) lookup_p = SSA_NAME_VAR (p); if (lookup_id_for_tree (lookup_p, &id)) @@ -4591,13 +4593,13 @@ init_alias_heapvars (void) { heapvar_for_stmt = htab_create_ggc (11, tree_map_hash, tree_map_eq, NULL); - nonlocal_all = NULL_TREE; + cfun->gimple_df->nonlocal_all = NULL_TREE; } void delete_alias_heapvars (void) { - nonlocal_all = NULL_TREE; + cfun->gimple_df->nonlocal_all = NULL_TREE; htab_delete (heapvar_for_stmt); } |