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

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to