[llvm] [AMDGPU] Improve the description of asyncmark semantics (PR #202579)
Fabian Ritter via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 11 02:44:31 PDT 2026
================
@@ -220,30 +217,96 @@ correctness. But inlining such a call may result in redundant waits.
.. code-block:: c++
void foo() {
- asyncmark(); // A
+ ...
+ asyncmark(); // X
+ ... // no wait.asyncmark()
}
void bar() {
- asyncmark(); // B
- asyncmark(); // C
+ asyncmark(); // B
+ asyncmark(); // C
foo();
- wait.asyncmark(1);
+ wait.asyncmark(1); // D
+ }
+
+Before inlining, it is unspecified whether ``X`` is *completed-at* ``D``, while
+``C`` is **not** *completed-at* ``D``. The programmer can only rely on ``B``
+being *completed-at* ``D``.
+
+.. code-block:: c++
+
+ void bar() {
+ asyncmark(); // B
+ asyncmark(); // C
+ asyncmark(); // X
----------------
ritter-x2a wrote:
Also add the surrounding `...` lines you added to the definition of `foo`?
https://github.com/llvm/llvm-project/pull/202579
More information about the llvm-commits
mailing list