diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2020-12-01 18:54:48 +0100 |
---|---|---|
committer | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2020-12-08 21:07:02 +0100 |
commit | 447f99b3b8baabbfb33b29123113637e54c5e652 (patch) | |
tree | 59eb5f7abb8bd21cd8d2eed6f71c55cc657070ba /gcc/cp/expr.c | |
parent | f7251a2c103bc48775cb9726a4bebeaebde96684 (diff) | |
download | gcc-447f99b3b8baabbfb33b29123113637e54c5e652.zip gcc-447f99b3b8baabbfb33b29123113637e54c5e652.tar.gz gcc-447f99b3b8baabbfb33b29123113637e54c5e652.tar.bz2 |
Avoid atomic for guard acquire when that is expensive
When the atomic access involves a call to __sync_synchronize
it is better to call __cxa_guard_acquire unconditionally,
since it handles the atomics too, or is a non-threaded
implementation when there is no gthread support for this target.
This fixes also a bug for the ARM EABI big-endian target,
that is, previously the wrong bit was checked.
2020-12-08 Bernd Edlinger <bernd.edlinger@hotmail.de>
* decl2.c: (is_atomic_expensive_p): New helper function.
(build_atomic_load_byte): Rename to...
(build_atomic_load_type): ... and add new parameter type.
(get_guard_cond): Skip the atomic here if that is expensive.
Use the correct type for the atomic load on certain targets.
Diffstat (limited to 'gcc/cp/expr.c')
0 files changed, 0 insertions, 0 deletions