[PATCH] D122377: [PowerPC] Support 16-byte lock free atomics on pwr8 and up

2022-04-08 Thread Kai Luo via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG549e118e93c6: [PowerPC] Support 16-byte lock free atomics on pwr8 and up (authored by lkail). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D122377: [PowerPC] Support 16-byte lock free atomics on pwr8 and up

2022-04-07 Thread Kai Luo via Phabricator via cfe-commits
lkail updated this revision to Diff 421385. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122377/new/ https://reviews.llvm.org/D122377 Files: clang/lib/Basic/Targets/PPC.cpp clang/lib/Basic/Targets/PPC.h

[PATCH] D122377: [PowerPC] Support 16-byte lock free atomics on pwr8 and up

2022-04-07 Thread Kai Luo via Phabricator via cfe-commits
lkail updated this revision to Diff 421384. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122377/new/ https://reviews.llvm.org/D122377 Files: clang/lib/Basic/Targets/PPC.cpp clang/lib/Basic/Targets/PPC.h

[PATCH] D122377: [PowerPC] Support 16-byte lock free atomics on pwr8 and up

2022-04-07 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast accepted this revision. hubert.reinterpretcast added a comment. This revision is now accepted and ready to land. LGTM with minor comments. Comment at: clang/test/CodeGen/PowerPC/atomic-alignment.c:1-12 // RUN: %clang_cc1 -verify -triple

[PATCH] D122377: [PowerPC] Support 16-byte lock free atomics on pwr8 and up

2022-04-06 Thread Kai Luo via Phabricator via cfe-commits
lkail updated this revision to Diff 421088. lkail added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122377/new/ https://reviews.llvm.org/D122377 Files: clang/lib/Basic/Targets/PPC.cpp

[PATCH] D122377: [PowerPC] Support 16-byte lock free atomics on pwr8 and up

2022-04-06 Thread Kai Luo via Phabricator via cfe-commits
lkail added inline comments. Comment at: llvm/test/CodeGen/PowerPC/atomics-i128.ll:77 +; AIX64-PWR8-NEXT:sync +; AIX64-PWR8-NEXT:bl .__sync_lock_test_and_set_16[PR] +; AIX64-PWR8-NEXT:nop hubert.reinterpretcast wrote: > What library is this expected

[PATCH] D122377: [PowerPC] Support 16-byte lock free atomics on pwr8 and up

2022-04-06 Thread Kai Luo via Phabricator via cfe-commits
lkail added inline comments. Comment at: clang/lib/Basic/Targets/PPC.h:440 if (Triple.isOSAIX() || Triple.isOSLinux()) DataLayout += "-S128-v256:256:256-v512:512:512"; resetDataLayout(DataLayout); adalava wrote: > I don't understand what

[PATCH] D122377: [PowerPC] Support 16-byte lock free atomics on pwr8 and up

2022-04-06 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/CodeGen/PowerPC/atomic-alignment.c:14 // PPC: @c = global i8 0, align 1{{$}} _Atomic(char) c; // expected-no-diagnostics I was recently informed that, instead of using

[PATCH] D122377: [PowerPC] Support 16-byte lock free atomics on pwr8 and up

2022-04-06 Thread Alfredo Dal'Ava JĂșnior via Phabricator via cfe-commits
adalava added inline comments. Comment at: clang/lib/Basic/Targets/PPC.h:440 if (Triple.isOSAIX() || Triple.isOSLinux()) DataLayout += "-S128-v256:256:256-v512:512:512"; resetDataLayout(DataLayout); I don't understand what DataLayout does mean,

[PATCH] D122377: [PowerPC] Support 16-byte lock free atomics on pwr8 and up

2022-04-05 Thread Kai Luo via Phabricator via cfe-commits
lkail updated this revision to Diff 420687. lkail added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122377/new/ https://reviews.llvm.org/D122377 Files: clang/lib/Basic/Targets/PPC.cpp

[PATCH] D122377: [PowerPC] Support 16-byte lock free atomics on pwr8 and up

2022-04-05 Thread Kai Luo via Phabricator via cfe-commits
lkail added a comment. In D122377#3428533 , @hubert.reinterpretcast wrote: > I am not sure that the choice of `isOSBinFormatELF` to (afaik) primarily > scope this change from affecting AIX (where we know the library calls are not > implemented to be

[PATCH] D122377: [PowerPC] Support 16-byte lock free atomics on pwr8 and up

2022-04-04 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. I am not sure that the choice of `isOSBinFormatELF` to (afaik) primarily scope this change from affecting AIX (where we know the library calls are not implemented to be lock-free yet) is better than alternative where the condition is for little-endian

[PATCH] D122377: [PowerPC] Support 16-byte lock free atomics on pwr8 and up

2022-04-04 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Basic/Targets/PPC.h:443 -// PPC64 supports atomics up to 8 bytes. -MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64; +// PPC64 supports atomics up to 16 bytes. +MaxAtomicPromoteWidth = 128;

[PATCH] D122377: [PowerPC] Support 16-byte lock free atomics on pwr8 and up

2022-04-04 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Basic/Targets/PPC.h:448 + void setMaxAtomicWidth() override { +// For layout on ELF targets, we support up to 16 bytes. +if (getTriple().isOSBinFormatELF()) hubert.reinterpretcast

[PATCH] D122377: [PowerPC] Support 16-byte lock free atomics on pwr8 and up

2022-04-04 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/lib/Basic/Targets/PPC.h:448 + void setMaxAtomicWidth() override { +// For layout on ELF targets, we support up to 16 bytes. +if (getTriple().isOSBinFormatELF()) lkail wrote: >

[PATCH] D122377: [PowerPC] Support 16-byte lock free atomics on pwr8 and up

2022-03-31 Thread Kai Luo via Phabricator via cfe-commits
lkail marked an inline comment as done. lkail added inline comments. Comment at: clang/lib/Basic/Targets/PPC.h:448 + void setMaxAtomicWidth() override { +// For layout on ELF targets, we support up to 16 bytes. +if (getTriple().isOSBinFormatELF())

[PATCH] D122377: [PowerPC] Support 16-byte lock free atomics on pwr8 and up

2022-03-31 Thread Kai Luo via Phabricator via cfe-commits
lkail updated this revision to Diff 419618. lkail retitled this revision from "[PowerPC][Linux] Support 16-byte lock free atomics on pwr8 and up" to "[PowerPC] Support 16-byte lock free atomics on pwr8 and up". lkail edited the summary of this revision. lkail added a comment. Make 16-byte