jayfoad wrote:
Some review comments from Claude:
---
`fence syncscope("singlethread") acquire` can't synchronise with another
thread, so it could be ignored.
Acquires marked `!mmra !{!"amdgcn-av", !"none"}` are not make-visible
operations, so they could also be ignored.
A follow-up could ignore workgroup-or-narrower acquires when the kernel has no
possibly-aliasing writes, no unknown calls, and no acquire wider than workgroup
anywhere in the function.
- Why that is sound: any hb chain into a workgroup-scope acquire goes through
threads of the same workgroup, which run the same function.
Test coverage:
- Add a fence case to `promote-kernel-arguments.ll`. The PR changes that
pass's behaviour and no test shows it.
- Add a call to an external function, or a helper containing an acquire, to
`noclobber-barrier.ll`. It works, but nothing pins it.
- The `noclobber-barrier.ll` header comment ("barrier or fence in between of
loads is not considered a clobber") is now wrong for acquire fences.
`isReallyAClobber`'s comment says "Ignore non-acquire atomics not aliasing ...
just like a fence". Fences are now *not* always ignored. Reword it, e.g.
"Non-acquire atomics that don't alias are not clobbers. Acquire operations
always are,
https://github.com/llvm/llvm-project/pull/219991
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits