Unify implementations of __builtin_mem_*_fence and __sync_synchronize.
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 Nov 2011 19:29:04 +0000 (19:29 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 17 Nov 2011 19:29:04 +0000 (19:29 +0000)
commitfe54c06bb15e4aac831d34510f85ac60a05819a9
treec5fe338ba828667922ef001c6df7a932a78412e6
parent522983c25b6397988b0be1d3c76a57ba46aee9c7
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181451 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/builtins.c
gcc/expr.h
gcc/optabs.c
gcc/optabs.h