diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-17 11:15:55 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-11-17 11:15:55 +0000 |
commit | a44814b9c7507ab0ac3187af2b7264b36f30de66 (patch) | |
tree | 4a3893b319747d8261802d8a29ec5daed4426e0a | |
parent | 01631cfb28a1ae100fb3f50aeacea6ce92d2cb68 (diff) | |
download | gcc-a44814b9c7507ab0ac3187af2b7264b36f30de66.tar.gz |
PR middle-end/45838
* tree-ssa-alias.c (ref_maybe_used_by_call_p_1,
call_may_clobber_ref_p_1): Return true for __sync_* and some
OpenMP builtins that act as threading barriers.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166863 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/tree-ssa-alias.c | 44 |
2 files changed, 52 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cb041e05585..91ae63ea98b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2010-11-17 Jakub Jelinek <jakub@redhat.com> + Richard Guenther <rguenther@suse.de> + + PR middle-end/45838 + * tree-ssa-alias.c (ref_maybe_used_by_call_p_1, + call_may_clobber_ref_p_1): Return true for __sync_* and some + OpenMP builtins that act as threading barriers. + 2010-11-17 Richard Guenther <rguenther@suse.de> PR tree-optimization/46498 diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 42335b577a5..b5af0133079 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -1209,6 +1209,28 @@ ref_maybe_used_by_call_p_1 (gimple call, ao_ref *ref) case BUILT_IN_SINCOSF: case BUILT_IN_SINCOSL: return false; + /* __sync_* builtins and some OpenMP builtins act as threading + barriers. */ +#undef DEF_SYNC_BUILTIN +#define DEF_SYNC_BUILTIN(ENUM, NAME, TYPE, ATTRS) case ENUM: +#include "sync-builtins.def" +#undef DEF_SYNC_BUILTIN + case BUILT_IN_GOMP_ATOMIC_START: + case BUILT_IN_GOMP_ATOMIC_END: + case BUILT_IN_GOMP_BARRIER: + case BUILT_IN_GOMP_TASKWAIT: + case BUILT_IN_GOMP_CRITICAL_START: + case BUILT_IN_GOMP_CRITICAL_END: + case BUILT_IN_GOMP_CRITICAL_NAME_START: + case BUILT_IN_GOMP_CRITICAL_NAME_END: + case BUILT_IN_GOMP_LOOP_END: + case BUILT_IN_GOMP_ORDERED_START: + case BUILT_IN_GOMP_ORDERED_END: + case BUILT_IN_GOMP_PARALLEL_END: + case BUILT_IN_GOMP_SECTIONS_END: + case BUILT_IN_GOMP_SINGLE_COPY_START: + case BUILT_IN_GOMP_SINGLE_COPY_END: + return true; default: /* Fallthru to general call handling. */; @@ -1465,6 +1487,28 @@ call_may_clobber_ref_p_1 (gimple call, ao_ref *ref) return (ptr_deref_may_alias_ref_p_1 (sin, ref) || ptr_deref_may_alias_ref_p_1 (cos, ref)); } + /* __sync_* builtins and some OpenMP builtins act as threading + barriers. */ +#undef DEF_SYNC_BUILTIN +#define DEF_SYNC_BUILTIN(ENUM, NAME, TYPE, ATTRS) case ENUM: +#include "sync-builtins.def" +#undef DEF_SYNC_BUILTIN + case BUILT_IN_GOMP_ATOMIC_START: + case BUILT_IN_GOMP_ATOMIC_END: + case BUILT_IN_GOMP_BARRIER: + case BUILT_IN_GOMP_TASKWAIT: + case BUILT_IN_GOMP_CRITICAL_START: + case BUILT_IN_GOMP_CRITICAL_END: + case BUILT_IN_GOMP_CRITICAL_NAME_START: + case BUILT_IN_GOMP_CRITICAL_NAME_END: + case BUILT_IN_GOMP_LOOP_END: + case BUILT_IN_GOMP_ORDERED_START: + case BUILT_IN_GOMP_ORDERED_END: + case BUILT_IN_GOMP_PARALLEL_END: + case BUILT_IN_GOMP_SECTIONS_END: + case BUILT_IN_GOMP_SINGLE_COPY_START: + case BUILT_IN_GOMP_SINGLE_COPY_END: + return true; default: /* Fallthru to general call handling. */; } |