This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Eagerly evaluate __atomic_is_lock_free to 0 for oversized types
- From: Fangrui Song <i at maskray dot me>
- To: gcc at gcc dot gnu dot org
- Cc: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Date: Mon, 10 Feb 2020 20:34:38 -0800
- Subject: Eagerly evaluate __atomic_is_lock_free to 0 for oversized types
GCC never evaluates __atomic_is_lock_free to 0. (gcc/builtins.c:fold_builtin_atomic_always_lock_free)
I'd like to change clang to eagerly evaluate __atomic_is_lock_free to 0 for apparently oversized types.
This helps some platforms to avoid a dependency on libatomic.
Either of the following choices can move my patch https://reviews.llvm.org/D72579 forward:
* GCC will like do the same
* GCC is committed to not extend __atomic_is_lock_free in a clang incompatible way.