[PATCH] D127189: [clang][AIX] Add option to control quadword lock free atomics ABI on AIX
Kai Luo via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 21 22:33:03 PDT 2022
lkail added a comment.
> Can we use the feature bit FeatureQuadwordAtomic to decide whether QuadAtomic is supported or not on AIX? Like what we do for Linux.
`FeatureQuadwordAtomic` is for cpu level control, while `-mabi=quadword-atomics` is for ABI level. AIX running on pwr8+ also features `FeatureQuadwordAtomic`, but in the case described in the patch summary, sometimes we can't enable quadword lock free atomics on AIX by default, so that clang generate libcalls into libatomic rather than inlining lock free operations. libatomic has the final decision to use lock-free version or not.
> The reason we need this option is: we may need to compile a lock free libatomic on a Power7 or below target?
We need to compile a quadword lock free libatomic for CPUs above pwr8.
> If so, do we have similar issue on Linux? Thanks.
On Linux, `clang` is linking against GNU's libatomic by default, that depends on GNU libatomic's behaviour.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127189/new/
https://reviews.llvm.org/D127189
More information about the cfe-commits
mailing list