[PATCH] Handle BUILT_IN_RETURN in PTA
Richard Guenther
rguenther@suse.de
Mon May 31 13:00:00 GMT 2010
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.
Richard.
2010-05-31 Richard Guenther <rguenther@suse.de>
* tree-ssa-structalias.c (find_func_aliases): Handle
BUILT_IN_RETURN.
Index: gcc/tree-ssa-structalias.c
===================================================================
*** gcc/tree-ssa-structalias.c (revision 160066)
--- gcc/tree-ssa-structalias.c (working copy)
*************** find_func_aliases (gimple origt)
*** 4241,4246 ****
--- 4241,4266 ----
/* va_end doesn't have any effect that matters. */
case BUILT_IN_VA_END:
return;
+ /* Alternate return. Simply give up for now. */
+ case BUILT_IN_RETURN:
+ {
+ fi = NULL;
+ if (!in_ipa_mode
+ || !(fi = get_vi_for_tree (cfun->decl)))
+ make_constraint_from (get_varinfo (escaped_id), anything_id);
+ else if (in_ipa_mode
+ && fi != NULL)
+ {
+ struct constraint_expr lhs, rhs;
+ lhs = get_function_part_constraint (fi, fi_result);
+ rhs.var = anything_id;
+ rhs.offset = 0;
+ rhs.type = SCALAR;
+ get_constraint_for (gimple_return_retval (t), &rhsc);
+ process_constraint (new_constraint (lhs, rhs));
+ }
+ return;
+ }
/* printf-style functions may have hooks to set pointers to
point to somewhere into the generated string. Leave them
for a later excercise... */
More information about the Gcc-patches
mailing list