[llvm] [NVPTX] Add Volta Atomic SequentiallyConsistent Load and Store Operations (PR #98551)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 2 11:34:47 PDT 2024
================
@@ -82,6 +83,36 @@ inline unsigned promoteScalarArgumentSize(unsigned size) {
bool shouldEmitPTXNoReturn(const Value *V, const TargetMachine &TM);
bool Isv2x16VT(EVT VT);
+
+namespace NVPTX {
+
+inline std::string OrderingToCString(Ordering Order) {
+ switch (Order) {
+ case Ordering::NotAtomic:
+ return "NotAtomic";
+ case Ordering::Relaxed:
+ return "Relaxed";
+ case Ordering::Acquire:
+ return "Acquire";
+ case Ordering::Release:
+ return "Release";
+ // case Ordering::AcquireRelease: return "AcquireRelease";
+ case Ordering::SequentiallyConsistent:
+ return "SequentiallyConsistent";
+ case Ordering::Volatile:
+ return "Volatile";
+ case Ordering::RelaxedMMIO:
+ return "RelaxedMMIO";
+ }
+ report_fatal_error("unknown ordering");
+}
+
+inline raw_ostream &operator<<(raw_ostream &O, Ordering Order) {
+ O << OrderingToCString(Order);
+ return O;
+}
+
+} // namespace NVPTX
}
----------------
Artem-B wrote:
That's the end of `namespace llvm`. You may want to add a comment here.
https://github.com/llvm/llvm-project/pull/98551
More information about the llvm-commits
mailing list