* tree-ssa-structalias.c (callused_id): Remove.
(call_stmt_vars): New.
(get_call_vi): Likewise.
(lookup_call_use_vi): Likewise.
(lookup_call_clobber_vi): Likewise.
(get_call_use_vi): Likewise.
(get_call_clobber_vi): Likewise.
(make_transitive_closure_constraints): Likewise.
(handle_const_call): Adjust to do per-call call-used handling.
(handle_pure_call): Likewise.
(find_what_var_points_to): Remove general callused handling.
(init_base_vars): Likewise.
(init_alias_vars): Initialize call_stmt_vars.
(compute_points_to_sets): Process call-used and call-clobbered
vars for call statements.
(delete_points_to_sets): Free call_stmt_vars.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158260
138bc75d-0d04-0410-961f-
82ee72b054a4
2010-04-13 Richard Guenther <rguenther@suse.de>
2010-04-13 Richard Guenther <rguenther@suse.de>
+ * tree-ssa-structalias.c (callused_id): Remove.
+ (call_stmt_vars): New.
+ (get_call_vi): Likewise.
+ (lookup_call_use_vi): Likewise.
+ (lookup_call_clobber_vi): Likewise.
+ (get_call_use_vi): Likewise.
+ (get_call_clobber_vi): Likewise.
+ (make_transitive_closure_constraints): Likewise.
+ (handle_const_call): Adjust to do per-call call-used handling.
+ (handle_pure_call): Likewise.
+ (find_what_var_points_to): Remove general callused handling.
+ (init_base_vars): Likewise.
+ (init_alias_vars): Initialize call_stmt_vars.
+ (compute_points_to_sets): Process call-used and call-clobbered
+ vars for call statements.
+ (delete_points_to_sets): Free call_stmt_vars.
+
+2010-04-13 Richard Guenther <rguenther@suse.de>
+
* tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
Only add RW dependence for dependence distance zero.
Adjust maximal vectorization factor according to dependences.
* tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
Only add RW dependence for dependence distance zero.
Adjust maximal vectorization factor according to dependences.
process_constraint (new_constraint (lhs, rhs));
}
process_constraint (new_constraint (lhs, rhs));
}
-/* Create a new artificial heap variable with NAME.
- Return the created variable. */
+/* Create a new artificial heap variable with NAME and make a
+ constraint from it to LHS. Return the created variable. */
static varinfo_t
make_heapvar_for (varinfo_t lhs, const char *name)
static varinfo_t
make_heapvar_for (varinfo_t lhs, const char *name)
if (vi->id == nothing_id)
pt->null = 1;
else if (vi->id == escaped_id)
if (vi->id == nothing_id)
pt->null = 1;
else if (vi->id == escaped_id)
- {
- if (in_ipa_mode)
- pt->ipa_escaped = 1;
- else
- pt->escaped = 1;
- }
else if (vi->id == nonlocal_id)
pt->nonlocal = 1;
else if (vi->is_heap_var)
else if (vi->id == nonlocal_id)
pt->nonlocal = 1;
else if (vi->is_heap_var)
basic_block bb;
unsigned i;
varinfo_t vi;
basic_block bb;
unsigned i;
varinfo_t vi;
- struct pt_solution callused;
timevar_push (TV_TREE_PTA);
timevar_push (TV_TREE_PTA);
/* Compute the points-to set for ESCAPED used for call-clobber analysis. */
find_what_var_points_to (get_varinfo (escaped_id),
&cfun->gimple_df->escaped);
/* Compute the points-to set for ESCAPED used for call-clobber analysis. */
find_what_var_points_to (get_varinfo (escaped_id),
&cfun->gimple_df->escaped);
- find_what_var_points_to (get_varinfo (callused_id), &callused);
/* Make sure the ESCAPED solution (which is used as placeholder in
other solutions) does not reference itself. This simplifies
/* Make sure the ESCAPED solution (which is used as placeholder in
other solutions) does not reference itself. This simplifies
pt = gimple_call_use_set (stmt);
if (gimple_call_flags (stmt) & ECF_CONST)
memset (pt, 0, sizeof (struct pt_solution));
pt = gimple_call_use_set (stmt);
if (gimple_call_flags (stmt) & ECF_CONST)
memset (pt, 0, sizeof (struct pt_solution));
- else if (gimple_call_flags (stmt) & ECF_PURE)
+ else if ((vi = lookup_call_use_vi (stmt)) != NULL)
- /* For const calls we should now be able to compute the
- call-used set per function. */
- *pt = callused;
+ find_what_var_points_to (vi, pt);
+ /* Escaped (and thus nonlocal) variables are always
+ implicitly used by calls. */
/* ??? ESCAPED can be empty even though NONLOCAL
always escaped. */
pt->nonlocal = 1;
/* ??? ESCAPED can be empty even though NONLOCAL
always escaped. */
pt->nonlocal = 1;
+ /* If there is nothing special about this call then
+ we have made everything that is used also escape. */
*pt = cfun->gimple_df->escaped;
pt->nonlocal = 1;
}
*pt = cfun->gimple_df->escaped;
pt->nonlocal = 1;
}