[llvm] [NVPTX] Add Volta Atomic SequentiallyConsistent Load and Store Operations (PR #98551)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 31 12:05:52 PDT 2024
================
@@ -106,15 +106,49 @@ enum LoadStore {
isStoreShift = 6
};
-namespace PTXLdStInstCode {
-enum MemorySemantic {
+// Extends LLVM AtomicOrdering with PTX Orderings:
+using OrderingUnderlyingType = unsigned int;
+enum class Ordering : OrderingUnderlyingType {
NotAtomic = 0, // PTX calls these: "Weak"
- Volatile = 1,
+ // Unordered = 1, // NVPTX maps LLVM Unorderd to Relaxed
Relaxed = 2,
- Acquire = 3,
- Release = 4,
- RelaxedMMIO = 5
+ // Consume = 3, // Unimplemented in LLVM; NVPTX would map to "Acquire"
+ Acquire = 4,
----------------
gonzalobg wrote:
I don't think we really really need them, but in the DAG they are just `(i32 x)` nodes where `x` is one of these values, and the values picked here match the ones of LLVM `AtomicOrdering` for the cases in which both expose the same ordering, which makes it easy to interpret those DAG nodes.
https://github.com/llvm/llvm-project/pull/98551
More information about the llvm-commits
mailing list