[llvm-branch-commits] [clang] [llvm] AMDGPU: Use module flags to control xnack and sramecc (PR #204595)
Shilei Tian via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jun 18 20:23:47 PDT 2026
================
@@ -871,10 +871,48 @@ consumed by the AMDGPU backend during code generation.
- Same as above, but for typed buffer instructions (``tbuffer_load`` /
``tbuffer_store``).
+ * - ``amdgpu.xnack``
+ - ``i32``
+ - Error
+ - Controls XNACK (page fault) replay mode. This is ignored on
+ targets which do not support xnack.
+
+ - absent: **any**. The module can be loaded and executed in a process
+ with XNACK replay either enabled or disabled. Code generation
+ assumes XNACK may be enabled.
+ - ``0``: **off**. The module can only be loaded and executed in a
+ process with XNACK replay disabled. Code generation is optimized
+ for XNACK disabled.
+ - ``1``: **on**. The module can only be loaded and executed in a
+ process with XNACK replay enabled. Code generation assumes XNACK
+ is enabled.
+
+ At link time, modules with conflicting settings (``0`` vs ``1``)
+ produce an error. Modules with **any** (absent flag) are compatible
+ with any setting.
+
+ * - ``amdgpu.sramecc``
+ - ``i32``
+ - Error
+ - Controls SRAMECC mode. This is ignored on targets which do not
+ support sramecc.
+
+ - absent: **any**. The module can be loaded and executed in a process
+ with SRAMECC either enabled or disabled.
+ - ``0``: **off**. The module can only be loaded and executed in a
+ process with SRAMECC disabled.
+ - ``1``: **on**. The module can only be loaded and executed in a
+ process with SRAMECC enabled. Some instructions behave differently
+ (e.g., D16 memory instructions).
+
+ At link time, modules with conflicting settings (``0`` vs ``1``)
----------------
shiltian wrote:
I suppose this link time means full-LTO link time?
https://github.com/llvm/llvm-project/pull/204595
More information about the llvm-branch-commits
mailing list