+2006-11-28 Jan Hubicka <jh@suse.cz>
+
+ 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.
+
2006-11-28 Jan Hubicka <jh@suse.cz>
* builtins.c: Include tree-flow.h.
return 0;
if (srctype == desttype
- || (in_ssa_p
+ || (gimple_in_ssa_p (cfun)
&& tree_ssa_useless_type_conversion_1 (desttype, srctype)))
expr = srcvar;
else if ((INTEGRAL_TYPE_P (TREE_TYPE (srcvar))
#define forced_labels (cfun->expr->x_forced_labels)
#define stack_pointer_delta (cfun->expr->x_stack_pointer_delta)
+struct gimple_df;
struct temp_slot;
typedef struct temp_slot *temp_slot_p;
/* The control flow graph for this function. */
struct control_flow_graph *cfg;
+ /* SSA and dataflow information. */
+ struct gimple_df *gimple_df;
/* The loops in this function. */
struct loops * GTY((skip)) x_current_loops;
gimple_test_f = simple ? is_gimple_val : is_gimple_reg_rhs;
push_gimplify_context ();
- gimplify_ctxp->into_ssa = in_ssa_p;
+ gimplify_ctxp->into_ssa = gimple_in_ssa_p (cfun);
if (var)
expr = build2 (MODIFY_EXPR, TREE_TYPE (var), var, expr);
gimple_test_f, fb_rvalue);
gcc_assert (ret != GS_ERROR);
- if (referenced_vars)
+ if (gimple_referenced_vars (cfun))
{
for (t = gimplify_ctxp->temps; t ; t = TREE_CHAIN (t))
add_referenced_var (t);
may be called when not in SSA. For example,
final_cleanup calls this function via
cleanup_tree_cfg. */
- if (in_ssa_p)
+ if (gimple_in_ssa_p (cfun))
release_defs (stmt);
bsi_remove (&i, true);
TREE_BLOCK (new_stmt) = TREE_BLOCK (orig_stmt);
bsi_insert_before (bsi, new_stmt, BSI_SAME_STMT);
- if (in_ssa_p)
+ if (gimple_in_ssa_p (cfun))
mark_new_vars_to_rename (new_stmt);
return t;
return retval;
}
-/* A list of all the noreturn calls passed to modify_stmt.
- cleanup_control_flow uses it to detect cases where a mid-block
- indirect call has been turned into a noreturn call. When this
- happens, all the instructions after the call are no longer
- reachable and must be deleted as dead. */
-
-VEC(tree,gc) *modified_noreturn_calls;
-
/* Try to remove superfluous control structures. */
static bool
tree stmt;
/* Detect cases where a mid-block call is now known not to return. */
- while (VEC_length (tree, modified_noreturn_calls))
- {
- stmt = VEC_pop (tree, modified_noreturn_calls);
- bb = bb_for_stmt (stmt);
- if (bb != NULL && last_stmt (bb) != stmt && noreturn_call_p (stmt))
- split_block (bb, stmt);
- }
+ if (cfun->gimple_df)
+ while (VEC_length (tree, MODIFIED_NORETURN_CALLS (cfun)))
+ {
+ stmt = VEC_pop (tree, MODIFIED_NORETURN_CALLS (cfun));
+ bb = bb_for_stmt (stmt);
+ if (bb != NULL && last_stmt (bb) != stmt && noreturn_call_p (stmt))
+ split_block (bb, stmt);
+ }
FOR_EACH_BB (bb)
{
for (parm = DECL_ARGUMENTS (cfun->decl); parm ; parm = TREE_CHAIN (parm))
if (is_complex_reg (parm) && var_ann (parm) != NULL)
{
- tree ssa_name = default_def (parm);
+ tree ssa_name = gimple_default_def (cfun, parm);
VEC_replace (complex_lattice_t, complex_lattice_values,
SSA_NAME_VERSION (ssa_name), VARYING);
}
mod = stmt = bsi_stmt (*bsi);
if (TREE_CODE (stmt) == RETURN_EXPR)
mod = TREE_OPERAND (mod, 0);
- else if (in_ssa_p)
+ else if (gimple_in_ssa_p (cfun))
update_complex_components (bsi, stmt, r, i);
type = TREE_TYPE (TREE_OPERAND (mod, 1));
continue;
type = TREE_TYPE (type);
- ssa_name = default_def (parm);
+ ssa_name = gimple_default_def (cfun, parm);
if (!ssa_name)
continue;
= build3 (CALL_EXPR, type, build_fold_addr_expr (fn), args, NULL);
update_stmt (stmt);
- if (in_ssa_p)
+ if (gimple_in_ssa_p (cfun))
{
tree lhs = TREE_OPERAND (stmt, 0);
type = TREE_TYPE (type);
}
}
- if (in_ssa_p)
+ if (gimple_in_ssa_p (cfun))
{
al = find_lattice_value (ac);
if (al == UNINITIALIZED)
static tree find_vars_r (tree *, int *, void *);
-/* Global declarations. */
-
-/* Array of all variables referenced in the function. */
-htab_t referenced_vars;
-
-/* Default definition for this symbols. If set for symbol, it
- means that the first reference to this variable in the function is a
- USE or a VUSE. In those cases, the SSA renamer creates an SSA name
- for this variable with an empty defining statement. */
-htab_t default_defs;
-
-
/*---------------------------------------------------------------------------
Dataflow analysis (DFA) routines
---------------------------------------------------------------------------*/
if (TREE_CODE (type) == COMPLEX_TYPE)
DECL_COMPLEX_GIMPLE_REG_P (t) = 1;
- if (referenced_vars)
+ if (gimple_referenced_vars (cfun))
{
add_referenced_var (t);
mark_sym_for_renaming (t);
}
}
- if (default_def (var))
+ if (gimple_default_def (cfun, var))
{
fprintf (file, ", default def: ");
- print_generic_expr (file, default_def (var), dump_flags);
+ print_generic_expr (file, gimple_default_def (cfun, var), dump_flags);
}
if (may_aliases (var))
{
struct int_tree_map *h, in;
in.uid = uid;
- h = (struct int_tree_map *) htab_find_with_hash (referenced_vars, &in, uid);
+ h = (struct int_tree_map *) htab_find_with_hash (gimple_referenced_vars (cfun),
+ &in, uid);
gcc_assert (h || uid == 0);
if (h)
return h->to;
in.uid = uid;
in.to = to;
- h = (struct int_tree_map *) htab_find_with_hash (referenced_vars, &in, uid);
+ h = (struct int_tree_map *) htab_find_with_hash (gimple_referenced_vars (cfun),
+ &in, uid);
if (h)
{
h = GGC_NEW (struct int_tree_map);
h->uid = uid;
h->to = to;
- loc = htab_find_slot_with_hash (referenced_vars, h, uid, INSERT);
+ loc = htab_find_slot_with_hash (gimple_referenced_vars (cfun),
+ h, uid, INSERT);
*(struct int_tree_map **) loc = h;
return true;
}
variable. */
tree
-default_def (tree var)
+gimple_default_def (struct function *fn, tree var)
{
struct int_tree_map *h, in;
gcc_assert (SSA_VAR_P (var));
in.uid = DECL_UID (var);
- h = (struct int_tree_map *) htab_find_with_hash (default_defs, &in,
+ h = (struct int_tree_map *) htab_find_with_hash (DEFAULT_DEFS (fn),
+ &in,
DECL_UID (var));
if (h)
return h->to;
gcc_assert (SSA_VAR_P (var));
in.uid = DECL_UID (var);
- if (!def && default_def (var))
+ if (!def && gimple_default_def (cfun, var))
{
- loc = htab_find_slot_with_hash (default_defs, &in, DECL_UID (var), INSERT);
- htab_remove_elt (default_defs, *loc);
+ loc = htab_find_slot_with_hash (DEFAULT_DEFS (cfun), &in,
+ DECL_UID (var), INSERT);
+ htab_remove_elt (DEFAULT_DEFS (cfun), *loc);
return;
}
gcc_assert (TREE_CODE (def) == SSA_NAME);
- loc = htab_find_slot_with_hash (default_defs, &in, DECL_UID (var), INSERT);
+ loc = htab_find_slot_with_hash (DEFAULT_DEFS (cfun), &in,
+ DECL_UID (var), INSERT);
/* Default definition might be changed by tail call optimization. */
if (!*loc)
{
/* Inline functions for manipulating various data structures defined in
tree-flow.h. See tree-flow.h for documentation. */
+/* Return true when gimple SSA form was built.
+ gimple_in_ssa_p is queried by gimplifier in various early stages before SSA
+ infrastructure is initialized. Check for presence of the datastructures
+ at first place. */
+static inline bool
+gimple_in_ssa_p (struct function *fun)
+{
+ return fun && fun->gimple_df && fun->gimple_df->in_ssa_p;
+}
+
+/* 'true' after aliases have been computed (see compute_may_aliases). */
+static inline bool
+gimple_aliases_computed_p (struct function *fun)
+{
+ gcc_assert (fun && fun->gimple_df);
+ return fun->gimple_df->aliases_computed_p;
+}
+
+/* Addressable variables in the function. If bit I is set, then
+ REFERENCED_VARS (I) has had its address taken. Note that
+ CALL_CLOBBERED_VARS and ADDRESSABLE_VARS are not related. An
+ addressable variable is not necessarily call-clobbered (e.g., a
+ local addressable whose address does not escape) and not all
+ call-clobbered variables are addressable (e.g., a local static
+ variable). */
+static inline bitmap
+gimple_addressable_vars (struct function *fun)
+{
+ gcc_assert (fun && fun->gimple_df);
+ return fun->gimple_df->addressable_vars;
+}
+
+/* Call clobbered variables in the function. If bit I is set, then
+ REFERENCED_VARS (I) is call-clobbered. */
+static inline bitmap
+gimple_call_clobbered_vars (struct function *fun)
+{
+ gcc_assert (fun && fun->gimple_df);
+ return fun->gimple_df->call_clobbered_vars;
+}
+
+/* Array of all variables referenced in the function. */
+static inline htab_t
+gimple_referenced_vars (struct function *fun)
+{
+ if (!fun->gimple_df)
+ return NULL;
+ return fun->gimple_df->referenced_vars;
+}
+
+/* Artificial variable used to model the effects of function calls. */
+static inline tree
+gimple_global_var (struct function *fun)
+{
+ gcc_assert (fun && fun->gimple_df);
+ return fun->gimple_df->global_var;
+}
+
+/* Artificial variable used to model the effects of nonlocal
+ variables. */
+static inline tree
+gimple_nonlocal_all (struct function *fun)
+{
+ gcc_assert (fun && fun->gimple_df);
+ return fun->gimple_df->nonlocal_all;
+}
/* Initialize the hashtable iterator HTI to point to hashtable TABLE */
static inline void *
{
struct int_tree_map *itm;
itm = (struct int_tree_map *) first_htab_element (&iter->hti,
- referenced_vars);
+ gimple_referenced_vars
+ (cfun));
if (!itm)
return NULL;
return itm->to;
ann = stmt_ann (t);
if (ann == NULL)
ann = create_stmt_ann (t);
- else if (noreturn_call_p (t))
- VEC_safe_push (tree, gc, modified_noreturn_calls, t);
+ else if (noreturn_call_p (t) && cfun->gimple_df)
+ VEC_safe_push (tree, gc, MODIFIED_NORETURN_CALLS (cfun), t);
ann->modified = 1;
}
if (!MTAG_P (var))
return DECL_CALL_CLOBBERED (var);
else
- return bitmap_bit_p (call_clobbered_vars, DECL_UID (var));
+ return bitmap_bit_p (gimple_call_clobbered_vars (cfun), DECL_UID (var));
}
/* Mark variable VAR as being clobbered by function calls. */
var_ann (var)->escape_mask |= escape_type;
if (!MTAG_P (var))
DECL_CALL_CLOBBERED (var) = true;
- bitmap_set_bit (call_clobbered_vars, DECL_UID (var));
+ bitmap_set_bit (gimple_call_clobbered_vars (cfun), DECL_UID (var));
}
/* Clear the call-clobbered attribute from variable VAR. */
MTAG_GLOBAL (var) = 0;
if (!MTAG_P (var))
DECL_CALL_CLOBBERED (var) = false;
- bitmap_clear_bit (call_clobbered_vars, DECL_UID (var));
+ bitmap_clear_bit (gimple_call_clobbered_vars (cfun), DECL_UID (var));
}
/* Mark variable VAR as being non-addressable. */
{
if (!MTAG_P (var))
DECL_CALL_CLOBBERED (var) = false;
- bitmap_clear_bit (call_clobbered_vars, DECL_UID (var));
+ bitmap_clear_bit (gimple_call_clobbered_vars (cfun), DECL_UID (var));
TREE_ADDRESSABLE (var) = 0;
}
typedef struct basic_block_def *basic_block;
#endif
-/* True if the code is in ssa form. */
-extern bool in_ssa_p;
+/* Gimple dataflow datastructure. All publically available fields shall have
+ gimple_ accessor defined in tree-flow-inline.h, all publically modifiable
+ fields should have gimple_set accessor. */
+struct gimple_df GTY(()) {
+ /* Array of all variables referenced in the function. */
+ htab_t GTY((param_is (struct int_tree_map))) referenced_vars;
+ /* A list of all the noreturn calls passed to modify_stmt.
+ cleanup_control_flow uses it to detect cases where a mid-block
+ indirect call has been turned into a noreturn call. When this
+ happens, all the instructions after the call are no longer
+ reachable and must be deleted as dead. */
+ VEC(tree,gc) *modified_noreturn_calls;
+ /* Array of all SSA_NAMEs used in the function. */
+ VEC(tree,gc) *ssa_names;
+
+ /* Artificial variable used to model the effects of function calls. */
+ tree global_var;
+
+ /* Artificial variable used to model the effects of nonlocal
+ variables. */
+ tree nonlocal_all;
+
+ /* Call clobbered variables in the function. If bit I is set, then
+ REFERENCED_VARS (I) is call-clobbered. */
+ bitmap call_clobbered_vars;
+
+ /* Addressable variables in the function. If bit I is set, then
+ REFERENCED_VARS (I) has had its address taken. Note that
+ CALL_CLOBBERED_VARS and ADDRESSABLE_VARS are not related. An
+ addressable variable is not necessarily call-clobbered (e.g., a
+ local addressable whose address does not escape) and not all
+ call-clobbered variables are addressable (e.g., a local static
+ variable). */
+ bitmap addressable_vars;
+
+ /* Free list of SSA_NAMEs. */
+ tree free_ssanames;
+
+ /* Hashtable holding definition for symbol. If this field is not NULL, it
+ means that the first reference to this variable in the function is a
+ USE or a VUSE. In those cases, the SSA renamer creates an SSA name
+ for this variable with an empty defining statement. */
+ htab_t GTY((param_is (struct int_tree_map))) default_defs;
+
+ /* 'true' after aliases have been computed (see compute_may_aliases). */
+ unsigned int aliases_computed_p : 1;
+
+ /* True if the code is in ssa form. */
+ unsigned int in_ssa_p : 1;
+};
+
+/* Accessors for internal use only. Generic code should use abstraction
+ provided by tree-flow-inline.h or specific modules. */
+#define FREE_SSANAMES(fun) (fun)->gimple_df->free_ssanames
+#define SSANAMES(fun) (fun)->gimple_df->ssa_names
+#define MODIFIED_NORETURN_CALLS(fun) (fun)->gimple_df->modified_noreturn_calls
+#define DEFAULT_DEFS(fun) (fun)->gimple_df->default_defs
typedef struct
{
/* During into-ssa and the dominator optimizer, this field holds the
current version of this variable (an SSA_NAME). */
tree current_def;
-
+
/* If this variable is a structure, this fields holds a list of
symbols representing each of the fields of the structure. */
subvar_t subvars;
struct stmt_ann_d GTY((tag ("STMT_ANN"))) stmt;
};
-extern GTY(()) VEC(tree,gc) *modified_noreturn_calls;
-
typedef union tree_ann_d *tree_ann_t;
typedef struct var_ann_d *var_ann_t;
typedef struct function_ann_d *function_ann_t;
VEC_iterate (tree, (VEC), (ITER).i, (VAR)); \
(ITER).i++)
-/* Array of all variables referenced in the function. */
-extern GTY((param_is (struct int_tree_map))) htab_t referenced_vars;
-
-/* Default defs for undefined symbols. */
-extern GTY((param_is (struct int_tree_map))) htab_t default_defs;
-
extern tree referenced_var_lookup (unsigned int);
extern bool referenced_var_check_and_insert (tree);
-#define num_referenced_vars htab_elements (referenced_vars)
+#define num_referenced_vars htab_elements (gimple_referenced_vars (cfun))
#define referenced_var(i) referenced_var_lookup (i)
-/* Array of all SSA_NAMEs used in the function. */
-extern GTY(()) VEC(tree,gc) *ssa_names;
-
-#define num_ssa_names (VEC_length (tree, ssa_names))
-#define ssa_name(i) (VEC_index (tree, ssa_names, (i)))
-
-/* Artificial variable used to model the effects of function calls. */
-extern GTY(()) tree global_var;
-
-/* Artificial variable used to model the effects of nonlocal
- variables. */
-extern GTY(()) tree nonlocal_all;
-
-/* Call clobbered variables in the function. If bit I is set, then
- REFERENCED_VARS (I) is call-clobbered. */
-extern bitmap call_clobbered_vars;
-
-/* Addressable variables in the function. If bit I is set, then
- REFERENCED_VARS (I) has had its address taken. */
-extern bitmap addressable_vars;
-
-/* 'true' after aliases have been computed (see compute_may_aliases). */
-extern bool aliases_computed_p;
+#define num_ssa_names (VEC_length (tree, cfun->gimple_df->ssa_names))
+#define ssa_name(i) (VEC_index (tree, cfun->gimple_df->ssa_names, (i)))
/* Macros for showing usage statistics. */
#define SCALE(x) ((unsigned long) ((x) < 1024*10 \
extern tree make_rename_temp (tree, const char *);
extern void set_default_def (tree, tree);
-extern tree default_def (tree);
-extern tree default_def_fn (struct function *, tree);
+extern tree gimple_default_def (struct function *, tree);
/* In tree-phinodes.c */
extern void reserve_phi_args_for_new_edge (basic_block);
Graph. ACM Transactions on Programming Languages and Systems,
13(4):451-490, October 1991. */
-/* True if the code is in ssa form. */
-bool in_ssa_p;
-
/* Structure to map a variable VAR to the set of blocks that contain
definitions for VAR. */
struct def_blocks_d
static inline tree
get_default_def_for (tree sym)
{
- tree ddef = default_def (sym);
+ tree ddef = gimple_default_def (cfun, sym);
if (ddef == NULL_TREE)
{
sbitmap_free (interesting_blocks);
timevar_pop (TV_TREE_SSA_OTHER);
- in_ssa_p = true;
+ cfun->gimple_df->in_ssa_p = true;
return 0;
}
for (x = 0 ; x < num; x++)
{
tree var = partition_to_var (map, x);
- if (default_def (SSA_NAME_VAR (var)) == var)
+ if (gimple_default_def (cfun, SSA_NAME_VAR (var)) == var)
SET_BIT (live, x);
}
/* Flush out flow graph and SSA data. */
delete_var_map (map);
- in_ssa_p = false;
+ cfun->gimple_df->in_ssa_p = false;
return 0;
}
aliasing */
static bitmap_obstack alias_obstack;
-/* 'true' after aliases have been computed (see compute_may_aliases). */
-bool aliases_computed_p;
-
/* Structure to map a variable to its alias set and keep track of the
virtual operands that will be needed to represent it. */
struct alias_map_d
/* Global declarations. */
-/* Call clobbered variables in the function. If bit I is set, then
- REFERENCED_VARS (I) is call-clobbered. */
-bitmap call_clobbered_vars;
-
-/* Addressable variables in the function. If bit I is set, then
- REFERENCED_VARS (I) has had its address taken. Note that
- CALL_CLOBBERED_VARS and ADDRESSABLE_VARS are not related. An
- addressable variable is not necessarily call-clobbered (e.g., a
- local addressable whose address does not escape) and not all
- call-clobbered variables are addressable (e.g., a local static
- variable). */
-bitmap addressable_vars;
-
-/* When the program has too many call-clobbered variables and call-sites,
- this variable is used to represent the clobbering effects of function
- calls. In these cases, all the call clobbered variables in the program
- are forced to alias this variable. This reduces compile times by not
- having to keep track of too many V_MAY_DEF expressions at call sites. */
-tree global_var;
-
/* qsort comparison function to sort type/name tags by DECL_UID. */
static int
mark_call_clobbered (var, ESCAPE_IS_GLOBAL);
}
else if (TREE_CODE (var) == PARM_DECL
- && default_def (var)
+ && gimple_default_def (cfun, var)
&& POINTER_TYPE_P (TREE_TYPE (var)))
{
- tree def = default_def (var);
+ tree def = gimple_default_def (cfun, var);
get_ptr_info (def)->value_escapes_p = 1;
get_ptr_info (def)->escape_mask |= ESCAPE_IS_PARM;
}
ai->dereferenced_ptrs_load = BITMAP_ALLOC (&alias_obstack);
/* If aliases have been computed before, clear existing information. */
- if (aliases_computed_p)
+ if (gimple_aliases_computed_p (cfun))
{
unsigned i;
/* Similarly, clear the set of addressable variables. In this
case, we can just clear the set because addressability is
only computed here. */
- bitmap_clear (addressable_vars);
+ bitmap_clear (gimple_addressable_vars (cfun));
/* Clear flow-insensitive alias information from each symbol. */
FOR_EACH_REFERENCED_VAR (var, rvi)
}
/* Next time, we will need to reset alias information. */
- aliases_computed_p = true;
+ cfun->gimple_df->aliases_computed_p = true;
return ai;
}
{
size_t i;
- if (global_var)
- add_may_alias (ai->ref_all_symbol_mem_tag, global_var);
+ if (gimple_global_var (cfun))
+ add_may_alias (ai->ref_all_symbol_mem_tag, gimple_global_var (cfun));
else
{
/* First add the real call-clobbered variables. */
cleanup passes. */
if (TREE_ADDRESSABLE (var))
{
- if (!bitmap_bit_p (addressable_vars, DECL_UID (var))
+ if (!bitmap_bit_p (gimple_addressable_vars (cfun), DECL_UID (var))
&& TREE_CODE (var) != RESULT_DECL
&& !is_global_var (var))
{
for (sv = svars; sv; sv = sv->next)
{
- if (bitmap_bit_p (addressable_vars, DECL_UID (sv->var)))
+ if (bitmap_bit_p (gimple_addressable_vars (cfun),
+ DECL_UID (sv->var)))
okay_to_mark = false;
mark_sym_for_renaming (sv->var);
}
bitmap_iterator bi;
/* No need to create it, if we have one already. */
- if (global_var == NULL_TREE)
+ if (gimple_global_var (cfun) == NULL_TREE)
{
/* Count all the call-clobbered variables. */
n_clobbered = 0;
- EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, i, bi)
+ EXECUTE_IF_SET_IN_BITMAP (gimple_call_clobbered_vars (cfun), 0, i, bi)
{
n_clobbered++;
}
/* Mark all call-clobbered symbols for renaming. Since the initial
rewrite into SSA ignored all call sites, we may need to rename
.GLOBAL_VAR and the call-clobbered variables. */
- EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, i, bi)
+ EXECUTE_IF_SET_IN_BITMAP (gimple_call_clobbered_vars (cfun), 0, i, bi)
{
tree var = referenced_var (i);
/* If the function has calls to clobbering functions and
.GLOBAL_VAR has been created, make it an alias for all
call-clobbered variables. */
- if (global_var && var != global_var)
+ if (gimple_global_var (cfun) && var != gimple_global_var (cfun))
{
- add_may_alias (var, global_var);
+ add_may_alias (var, gimple_global_var (cfun));
gcc_assert (!get_subvars_for_var (var));
}
static void
create_global_var (void)
{
- global_var = build_decl (VAR_DECL, get_identifier (".GLOBAL_VAR"),
- void_type_node);
+ tree global_var = build_decl (VAR_DECL, get_identifier (".GLOBAL_VAR"),
+ void_type_node);
DECL_ARTIFICIAL (global_var) = 1;
TREE_READONLY (global_var) = 0;
DECL_EXTERNAL (global_var) = 1;
mark_call_clobbered (global_var, ESCAPE_UNKNOWN);
add_referenced_var (global_var);
mark_sym_for_renaming (global_var);
+ cfun->gimple_df->global_var = global_var;
}
{
if (POINTER_TYPE_P (TREE_TYPE (var)))
{
- tree def = default_def (var);
+ tree def = gimple_default_def (cfun, var);
if (def)
dump_points_to_info_for (file, def);
}
/* If both values have default defs, we can't coalesce. If only one has a
tag, make sure that variable is the new root partition. */
- if (default_def (root1))
+ if (gimple_default_def (cfun, root1))
{
- if (default_def (root2))
+ if (gimple_default_def (cfun, root2))
{
if (debug)
fprintf (debug, " : 2 default defs. No coalesce.\n");
ign1 = false;
}
}
- else if (default_def (root2))
+ else if (gimple_default_def (cfun, root2))
{
ign1 = true;
ign2 = false;
/* If we've found a default definition, then there's no problem. Both
stores will post-dominate it. And def_bb will be NULL. */
- if (expr == default_def (SSA_NAME_VAR (expr)))
+ if (expr == gimple_default_def (cfun, SSA_NAME_VAR (expr)))
return NULL_TREE;
def_stmt = SSA_NAME_DEF_STMT (expr);
var = partition_to_var (map, i);
stmt = SSA_NAME_DEF_STMT (var);
tmp = bb_for_stmt (stmt);
- d = default_def (SSA_NAME_VAR (var));
+ d = gimple_default_def (cfun, SSA_NAME_VAR (var));
if (bitmap_bit_p (live_entry_blocks (live, i), entry_block))
{
#endif
for (arg = DECL_ARGUMENTS (cfun->decl); arg; arg = TREE_CHAIN (arg))
- if (default_def (arg)
+ if (gimple_default_def (cfun, arg)
&& FLOAT_TYPE_P (TREE_TYPE (arg))
&& is_gimple_reg (arg))
- execute_cse_reciprocals_1 (NULL, default_def (arg));
+ execute_cse_reciprocals_1 (NULL, gimple_default_def (cfun, arg));
FOR_EACH_BB (bb)
{
/* If ALIAS is .GLOBAL_VAR then the memory reference REF must be
using a call-clobbered memory tag. By definition, call-clobbered
memory tags can always touch .GLOBAL_VAR. */
- if (alias == global_var)
+ if (alias == gimple_global_var (cfun))
return true;
/* We cannot prune nonlocal aliases because they are not type
specific. */
- if (alias == nonlocal_all)
+ if (alias == gimple_nonlocal_all (cfun))
return true;
/* If ALIAS is an SFT, it can't be touched if the offset
set on it, or else we will get the wrong answer on
clobbers. */
if (none_added
- && !updating_used_alone && aliases_computed_p
+ && !updating_used_alone && gimple_aliases_computed_p (cfun)
&& TREE_CODE (var) == SYMBOL_MEMORY_TAG)
gcc_assert (SMT_USED_ALONE (var));
/* If we created .GLOBAL_VAR earlier, just use it. See compute_may_aliases
for the heuristic used to decide whether to create .GLOBAL_VAR or not. */
- if (global_var)
+ if (gimple_global_var (cfun))
{
- add_stmt_operand (&global_var, s_ann, opf_is_def);
+ tree var = gimple_global_var (cfun);
+ add_stmt_operand (&var, s_ann, opf_is_def);
return;
}
not_read_b = callee ? ipa_reference_get_not_read_global (callee) : NULL;
not_written_b = callee ? ipa_reference_get_not_written_global (callee) : NULL;
/* Add a V_MAY_DEF operand for every call clobbered variable. */
- EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, u, bi)
+ EXECUTE_IF_SET_IN_BITMAP (gimple_call_clobbered_vars (cfun), 0, u, bi)
{
tree var = referenced_var_lookup (u);
unsigned int escape_mask = var_ann (var)->escape_mask;
/* if the function is not pure, it may reference memory. Add
a VUSE for .GLOBAL_VAR if it has been created. See add_referenced_var
for the heuristic used to decide whether to create .GLOBAL_VAR. */
- if (global_var)
+ if (gimple_global_var (cfun))
{
- add_stmt_operand (&global_var, s_ann, opf_none);
+ tree var = gimple_global_var (cfun);
+ add_stmt_operand (&var, s_ann, opf_none);
return;
}
not_read_b = callee ? ipa_reference_get_not_read_global (callee) : NULL;
/* Add a VUSE for each call-clobbered variable. */
- EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, u, bi)
+ EXECUTE_IF_SET_IN_BITMAP (gimple_call_clobbered_vars (cfun), 0, u, bi)
{
tree var = referenced_var (u);
tree real_var = var;
computed. By not bothering with virtual operands for CALL_EXPRs
we avoid adding superfluous virtual operands, which can be a
significant compile time sink (See PR 15855). */
- if (aliases_computed_p
- && !bitmap_empty_p (call_clobbered_vars)
+ if (gimple_aliases_computed_p (cfun)
+ && !bitmap_empty_p (gimple_call_clobbered_vars (cfun))
&& !(call_flags & ECF_NOVOPS))
{
/* A 'pure' or a 'const' function never call-clobbers anything.
/* Clobber all call-clobbered variables (or .GLOBAL_VAR if we
decided to group them). */
- if (global_var)
- add_stmt_operand (&global_var, s_ann, opf_is_def);
+ if (gimple_global_var (cfun))
+ {
+ tree var = gimple_global_var (cfun);
+ add_stmt_operand (&var, s_ann, opf_is_def);
+ }
else
- EXECUTE_IF_SET_IN_BITMAP (call_clobbered_vars, 0, i, bi)
+ EXECUTE_IF_SET_IN_BITMAP (gimple_call_clobbered_vars (cfun), 0, i, bi)
{
tree var = referenced_var (i);
add_stmt_operand (&var, s_ann, opf_is_def | opf_non_specific);
}
/* Now clobber all addressables. */
- EXECUTE_IF_SET_IN_BITMAP (addressable_vars, 0, i, bi)
+ EXECUTE_IF_SET_IN_BITMAP (gimple_addressable_vars (cfun), 0, i, bi)
{
tree var = referenced_var (i);
param;
param = TREE_CHAIN (param))
{
- if (default_def (param) != NULL)
+ if (gimple_default_def (cfun, param) != NULL)
{
- tree def = default_def (param);
+ tree def = gimple_default_def (cfun, param);
vn_lookup_or_add (def, NULL);
bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR), def);
if (cfun->static_chain_decl)
{
param = cfun->static_chain_decl;
- if (default_def (param) != NULL)
+ if (gimple_default_def (cfun, param) != NULL)
{
- tree def = default_def (param);
+ tree def = gimple_default_def (cfun, param);
vn_lookup_or_add (def, NULL);
bitmap_insert_into_set (TMP_GEN (ENTRY_BLOCK_PTR), def);
*stmt_p = TREE_SIDE_EFFECTS (expr) ? expr : build_empty_stmt ();
(*stmt_p)->common.ann = (tree_ann_t) ann;
- if (in_ssa_p
+ if (gimple_in_ssa_p (cfun)
&& TREE_SIDE_EFFECTS (expr))
{
/* Fix all the SSA_NAMEs created by *STMT_P to point to its new
int i;
if (TREE_CODE (SSA_NAME_VAR (e)) == PARM_DECL
- && e == default_def (SSA_NAME_VAR (e)))
+ && e == gimple_default_def (cfun, SSA_NAME_VAR (e)))
return find_operand_rank (e)->rank;
stmt = SSA_NAME_DEF_STMT (e);
param;
param = TREE_CHAIN (param))
{
- if (default_def (param) != NULL)
+ if (gimple_default_def (cfun, param) != NULL)
{
- tree def = default_def (param);
+ tree def = gimple_default_def (cfun, param);
insert_operand_rank (def, ++rank);
}
}
/* Give the chain decl a distinct rank. */
if (cfun->static_chain_decl != NULL)
{
- tree def = default_def (cfun->static_chain_decl);
+ tree def = gimple_default_def (cfun, cfun->static_chain_decl);
if (def != NULL)
insert_operand_rank (def, ++rank);
}
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;
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;
{
tree nonlocal = create_tmp_var_raw (type, "NONLOCAL");
- if (referenced_vars)
+ if (gimple_referenced_vars (cfun))
add_referenced_var (nonlocal);
DECL_EXTERNAL (nonlocal) = 1;
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);
}
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. */
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.
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;
}
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))
"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);
}
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;
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))
{
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);
}
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)
{
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))
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);
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;
}
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 ());
}
We could also use a zone allocator for these objects since they have
a very well defined lifetime. If someone wants to experiment with that
this is the place to try it. */
-
-/* Array of all SSA_NAMEs used in the function. */
-VEC(tree,gc) *ssa_names;
-
-/* Free list of SSA_NAMEs. This list is wiped at the end of each function
- after we leave SSA form. */
-static GTY (()) tree free_ssanames;
/* Version numbers with special meanings. We start allocating new version
numbers after the special ones. */
void
init_ssanames (void)
{
- ssa_names = VEC_alloc (tree, gc, 50);
+ SSANAMES (cfun) = VEC_alloc (tree, gc, 50);
/* Version 0 is special, so reserve the first slot in the table. Though
currently unused, we may use version 0 in alias analysis as part of
We use VEC_quick_push here because we know that SSA_NAMES has at
least 50 elements reserved in it. */
- VEC_quick_push (tree, ssa_names, NULL_TREE);
- free_ssanames = NULL;
+ VEC_quick_push (tree, SSANAMES (cfun), NULL_TREE);
+ FREE_SSANAMES (cfun) = NULL;
}
/* Finalize management of SSA_NAMEs. */
void
fini_ssanames (void)
{
- VEC_free (tree, gc, ssa_names);
- free_ssanames = NULL;
+ VEC_free (tree, gc, SSANAMES (cfun));
+ FREE_SSANAMES (cfun) = NULL;
}
/* Dump some simple statistics regarding the re-use of SSA_NAME nodes. */
gcc_assert (!stmt || EXPR_P (stmt) || TREE_CODE (stmt) == PHI_NODE);
/* If our free list has an element, then use it. */
- if (free_ssanames)
+ if (FREE_SSANAMES (cfun))
{
- t = free_ssanames;
- free_ssanames = TREE_CHAIN (free_ssanames);
+ t = FREE_SSANAMES (cfun);
+ FREE_SSANAMES (cfun) = TREE_CHAIN (FREE_SSANAMES (cfun));
#ifdef GATHER_STATISTICS
ssa_name_nodes_reused++;
#endif
/* The node was cleared out when we put it on the free list, so
there is no need to do so again here. */
gcc_assert (ssa_name (SSA_NAME_VERSION (t)) == NULL);
- VEC_replace (tree, ssa_names, SSA_NAME_VERSION (t), t);
+ VEC_replace (tree, SSANAMES (cfun), SSA_NAME_VERSION (t), t);
}
else
{
t = make_node (SSA_NAME);
SSA_NAME_VERSION (t) = num_ssa_names;
- VEC_safe_push (tree, gc, ssa_names, t);
+ VEC_safe_push (tree, gc, SSANAMES (cfun), t);
#ifdef GATHER_STATISTICS
ssa_name_nodes_created++;
#endif
/* Never release the default definition for a symbol. It's a
special SSA name that should always exist once it's created. */
- if (var == default_def (SSA_NAME_VAR (var)))
+ if (var == gimple_default_def (cfun, SSA_NAME_VAR (var)))
return;
/* If VAR has been registered for SSA updating, don't remove it.
while (imm->next != imm)
delink_imm_use (imm->next);
- VEC_replace (tree, ssa_names, SSA_NAME_VERSION (var), NULL_TREE);
+ VEC_replace (tree, SSANAMES (cfun),
+ SSA_NAME_VERSION (var), NULL_TREE);
memset (var, 0, tree_size (var));
imm->prev = imm;
SSA_NAME_IN_FREE_LIST (var) = 1;
/* And finally link it into the free list. */
- TREE_CHAIN (var) = free_ssanames;
- free_ssanames = var;
+ TREE_CHAIN (var) = FREE_SSANAMES (cfun);
+ FREE_SSANAMES (cfun) = var;
}
}
/* Make sure that we are in SSA. Otherwise, operand cache may point
to garbage. */
- gcc_assert (in_ssa_p);
+ gcc_assert (gimple_in_ssa_p (cfun));
FOR_EACH_SSA_TREE_OPERAND (def, stmt, iter, SSA_OP_ALL_DEFS)
if (TREE_CODE (def) == SSA_NAME)
SSA_NAME_VAR (ssa_name) = sym;
TREE_TYPE (ssa_name) = TREE_TYPE (sym);
}
-
-#include "gt-tree-ssanames.h"
return false;
/* Parameters that are only defined but never used need not be copied. */
- def = default_def (param);
+ def = gimple_default_def (cfun, param);
if (!def)
return false;
FOR_EACH_REFERENCED_VAR (var, rvi)
{
- if (!is_gimple_reg (var) && default_def (var) != NULL_TREE)
+ if (!is_gimple_reg (var) && gimple_default_def (cfun, var) != NULL_TREE)
mark_sym_for_renaming (var);
}
param = TREE_CHAIN (param))
if (arg_needs_copy_p (param))
{
- tree name = default_def (param);
+ tree name = gimple_default_def (cfun, param);
tree new_name = make_ssa_name (param, SSA_NAME_DEF_STMT (name));
tree phi;
/* If VAR is a default definition, the variable can take any value
in VAR's type. */
sym = SSA_NAME_VAR (var);
- if (var == default_def (sym))
+ if (var == gimple_default_def (cfun, sym))
{
/* Try to use the "nonnull" attribute to create ~[0, 0]
anti-ranges for pointers. Note that this is only valid with