* [committed] Fix BUILT_IN_ASSUME_ALIGNED handling in find_func_aliases_for_builtin_call
@ 2011-06-30 11:16 Jakub Jelinek
0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2011-06-30 11:16 UTC (permalink / raw)
To: gcc-patches
Hi!
__builtin_assume_aligned here needs to be handled just like a lhs = dest
assignment, while for memcpy/etc. resp. memset/etc. it was doing some
further processing, undesirable for this builtin.
Fixed thusly, tested on x86_64-linux, acked by Richi on IRC, committed to
trunk.
2011-06-30 Jakub Jelinek <jakub@redhat.com>
* tree-ssa-structalias.c (find_func_aliases_for_builtin_call): Fix
handling of BUILT_IN_ASSUME_ALIGNED.
--- gcc/tree-ssa-structalias.c.jj 2011-06-30 10:05:04.000000000 +0200
+++ gcc/tree-ssa-structalias.c 2011-06-30 11:02:01.462671158 +0200
@@ -4002,7 +4002,6 @@ find_func_aliases_for_builtin_call (gimp
case BUILT_IN_STPCPY_CHK:
case BUILT_IN_STRCAT_CHK:
case BUILT_IN_STRNCAT_CHK:
- case BUILT_IN_ASSUME_ALIGNED:
{
tree res = gimple_call_lhs (t);
tree dest = gimple_call_arg (t, (DECL_FUNCTION_CODE (fndecl)
@@ -4068,6 +4067,20 @@ find_func_aliases_for_builtin_call (gimp
VEC_free (ce_s, heap, lhsc);
return true;
}
+ case BUILT_IN_ASSUME_ALIGNED:
+ {
+ tree res = gimple_call_lhs (t);
+ tree dest = gimple_call_arg (t, 0);
+ if (res != NULL_TREE)
+ {
+ get_constraint_for (res, &lhsc);
+ get_constraint_for (dest, &rhsc);
+ process_all_all_constraints (lhsc, rhsc);
+ VEC_free (ce_s, heap, lhsc);
+ VEC_free (ce_s, heap, rhsc);
+ }
+ return true;
+ }
/* All the following functions do not return pointers, do not
modify the points-to sets of memory reachable from their
arguments and do not add to the ESCAPED solution. */
Jakub
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-06-30 10:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-30 11:16 [committed] Fix BUILT_IN_ASSUME_ALIGNED handling in find_func_aliases_for_builtin_call Jakub Jelinek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).