Unify implementations of __builtin_mem_*_fence and __sync_synchronize.
authorRichard Henderson <rth@redhat.com>
Thu, 17 Nov 2011 19:29:04 +0000 (11:29 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 17 Nov 2011 19:29:04 +0000 (11:29 -0800)
commitc39169c82c278bff88da0fcb05516420fbcf808a
treec5fe338ba828667922ef001c6df7a932a78412e6
parentcfb9952179d2ea470461a0ea3ab64c53a9d27fb8
Unify implementations of __builtin_mem_*_fence and __sync_synchronize.

* builtins.c (expand_builtin_mem_thread_fence): Remove.
(expand_builtin_mem_signal_fence): Remove.
(expand_builtin_atomic_thread_fence): Use expand_mem_thread_fence.
(expand_builtin_sync_synchronize): Likewise.
(expand_builtin_atomic_signal_fence): Use expand_mem_signal_fence.
* optabs.c (expand_asm_memory_barrier): Split out from
expand_builtin_mem_signal_fence.
(expand_mem_thread_fence): New, a combination of code from
expand_builtin_mem_thread_fence and expand_builtin_sync_synchronize.
(expand_mem_signal_fence): Moved and renamed from
expand_builtin_mem_signal_fence.
(expand_atomic_exchange): Use expand_mem_thread_fence.
(expand_atomic_load, expand_atomic_store): Likewise.
* expr.h, optabs.h: Update decls.

From-SVN: r181451
gcc/ChangeLog
gcc/builtins.c
gcc/expr.h
gcc/optabs.c
gcc/optabs.h