[llvm] [clang] [AMDGPU] Add an option to disable unsafe uses of atomic xor (PR #69229)

2023-11-09 Thread Pierre-Andre Saulais via cfe-commits
pasaulais wrote: @arsenm, could you share this unfinished patch you were working on? I could start from scratch but I don't want to duplicate the work you've already done. https://github.com/llvm/llvm-project/pull/69229 ___ cfe-commits mailing list c

[llvm] [clang] [AMDGPU] Add an option to disable unsafe uses of atomic xor (PR #69229)

2023-12-13 Thread Pierre-Andre Saulais via cfe-commits
https://github.com/pasaulais edited https://github.com/llvm/llvm-project/pull/69229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [AMDGPU] Add an option to disable unsafe uses of atomic xor (PR #69229)

2023-12-04 Thread Pierre-Andre Saulais via cfe-commits
https://github.com/pasaulais updated https://github.com/llvm/llvm-project/pull/69229 >From 24b0e5204f9eac6efaf502b5aa254f5ff7e11e69 Mon Sep 17 00:00:00 2001 From: Pierre-Andre Saulais Date: Thu, 23 Nov 2023 17:33:18 + Subject: [PATCH] [AMDGPU] Add an option to disable unsafe uses of atomic

[llvm] [clang] [AMDGPU] Add an option to disable unsafe uses of atomic xor (PR #69229)

2023-12-04 Thread Pierre-Andre Saulais via cfe-commits
https://github.com/pasaulais updated https://github.com/llvm/llvm-project/pull/69229 >From cd33e8471ab5e768c1b579f1bec1308c0b322e05 Mon Sep 17 00:00:00 2001 From: Pierre-Andre Saulais Date: Thu, 23 Nov 2023 17:33:18 + Subject: [PATCH] [AMDGPU] Add an option to disable unsafe uses of atomic

[clang] [llvm] [AMDGPU] Add an option to disable unsafe uses of atomic xor (PR #69229)

2024-03-14 Thread Pierre-Andre Saulais via cfe-commits
pasaulais wrote: > > @arsenm That makes sense, I don't think MMRA fits the fine-grained use case > > either. Does that mean we can stick with the approach from this PR? > > @b-sumner mentioned there was another similar approach being worked on. > > Something like this, but the naming and direc

[clang] [llvm] [AMDGPU] Add an option to disable unsafe uses of atomic xor (PR #69229)

2024-03-14 Thread Pierre-Andre Saulais via cfe-commits
pasaulais wrote: Also, this will need to be extended to other operations that can be impacted by fine-grained and remote access like `add`, `and`, `or`, `sub`, `fpadd` and `fpsub`. https://github.com/llvm/llvm-project/pull/69229 ___ cfe-commits maili

[clang] [llvm] [AMDGPU] Add an option to disable unsafe uses of atomic xor (PR #69229)

2024-02-29 Thread Pierre-Andre Saulais via cfe-commits
pasaulais wrote: > > In this case, MMRAs would only help in the sense that you won't need any > > new attributes and can just add an MMRA such as > > `atomic-lowering:fine-grained`. It's not really what MMRAs were made for > > (because this attribute doesn't affect semantics, just lowering sty

[clang] [AMDGPU] Add an option to disable unsafe uses of atomic xor (PR #69229)

2023-10-19 Thread Pierre-Andre Saulais via cfe-commits
pasaulais wrote: > The command-line changes look good to me. Adding @arsenm as a reviewer proper. Thanks Jan! https://github.com/llvm/llvm-project/pull/69229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [AMDGPU] Add an option to disable unsafe uses of atomic xor (PR #69229)

2023-10-23 Thread Pierre-Andre Saulais via cfe-commits
pasaulais wrote: Ping @hdelan https://github.com/llvm/llvm-project/pull/69229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] Add an option to disable unsafe uses of atomic xor (PR #69229)

2023-10-24 Thread Pierre-Andre Saulais via cfe-commits
pasaulais wrote: Thanks for the review. I agree that function-level attributes are not ideal for solving this issue and instruction-level metadata would work better with things like inlining. Is the incomplete patch you mentioned something I could take on and complete? Regarding int vs floati

[clang] [AMDGPU] Add an option to disable unsafe uses of atomic xor (PR #69229)

2023-10-16 Thread Pierre-Andre Saulais via cfe-commits
https://github.com/pasaulais created https://github.com/llvm/llvm-project/pull/69229 On some systems and when accessing certain memory areas it is not safe to use atomic xor with AMDGPU. This may be the case when using fine-grained memory allocations (e.g. through `hipAllocManaged`) and when t

[clang] [AMDGPU] Add an option to disable unsafe uses of atomic xor (PR #69229)

2023-10-16 Thread Pierre-Andre Saulais via cfe-commits
https://github.com/pasaulais edited https://github.com/llvm/llvm-project/pull/69229 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] Add an option to disable unsafe uses of atomic xor (PR #69229)

2023-10-16 Thread Pierre-Andre Saulais via cfe-commits
pasaulais wrote: Hi @jansvoboda11, @arsenm, I haven't yet got a commit merged to LLVM and can't request a review through the UI. Could I get a review on this patch? Thanks in advance and apologies if I've missed a step in the submission process. https://github.com/llvm/llvm-project/pull/69229

[clang] [llvm] [AMDGPU] Add an option to disable unsafe uses of atomic xor (PR #69229)

2024-02-19 Thread Pierre-Andre Saulais via cfe-commits
pasaulais wrote: Thanks for the comments @arsenm @yxsamliu @b-sumner. By approaching a similar solution, do you mean MMRAs (https://github.com/llvm/llvm-project/pull/78569) ? If so, should I rebase/adapt my patch to the MMRA PR? Or will this PR be redundant and needs closing? @yxsamliu These