ilinpv added a comment.
I think it looks reasonable to define 5th memory model, add barriers __sync_*
builtins and to outline-atomics calls as well.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91157/new/
https://reviews.llvm.org/D91157
efriedma added a comment.
https://github.com/llvm/llvm-project/issues/29472 was never fixed; whatever
issues exist with -moutline-atomics also exist with -mno-outline-atomics. (I
don't think anyone has run into any practical issues with this, so it hasn't
been a priority for anyone.)
sebpop added a comment.
Herald added a subscriber: MaskRay.
Herald added a project: All.
Hi Pavel,
We need to handle one more case for __sync_* builtins, please see testcase and
patches applied to GCC:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105162
Repository:
rG LLVM Github Monorepo
sebpop added a comment.
I tested this change on Graviton2 aarch64-linux by building
https://github.com/xianyi/OpenBLAS with `clang -O3 -moutline-atomics` and `make
test`: all tests pass with and without outline-atomics.
Clang was configured to use libgcc.
I also tested
ilinpv added inline comments.
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6377
+} else {
+ CmdArgs.push_back("-target-feature");
+ CmdArgs.push_back("-outline-atomics");
jyknight wrote:
> We don't usually explicitly use negative features like
jyknight accepted this revision.
jyknight added a comment.
This revision is now accepted and ready to land.
LG after fixing the minor nits.
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6377
+} else {
+ CmdArgs.push_back("-target-feature");
+
ilinpv added a comment.
Have you got any further comments?
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:2170
+ SmallVector Ops;
+ if (TLI.getLibcallName(LC)) {
+Ops.append(Node->op_begin() + 2, Node->op_end());
t.p.northover wrote:
ilinpv marked 10 inline comments as done.
ilinpv added inline comments.
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:15653
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p0493r1.pdf
+// (2) low level libgcc and compiler-rt support
t.p.northover added inline comments.
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp:2170
+ SmallVector Ops;
+ if (TLI.getLibcallName(LC)) {
+Ops.append(Node->op_begin() + 2, Node->op_end());
jyknight wrote:
> t.p.northover wrote:
> > I
jyknight added inline comments.
Comment at: llvm/docs/Atomics.rst:625
+
+Libcalls: out-of-line atomics
+=
I think this section needs to be put on the end of the section on `__sync_*`.
These functions are effectively an
t.p.northover added inline comments.
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6366
+ // Option -moutline-atomics supported for AArch64 target only.
+ if (Triple.getArch() != llvm::Triple::aarch64) {
+
ilinpv created this revision.
ilinpv added reviewers: jyknight, eli.friedman.
Herald added subscribers: llvm-commits, cfe-commits, dexonsmith, dang,
danielkiss, jfb, hiraditya, kristof.beyls.
Herald added projects: clang, LLVM.
ilinpv requested review of this revision.
This patch implements out
12 matches
Mail list logo