[clang] [llvm] [SPIRV][RFC] Rework / extend support for memory scopes (PR #106429)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 28 21:47:54 PDT 2024


================
@@ -188,6 +192,41 @@ void SPIRVTargetCodeGenInfo::setCUDAKernelCallingConvention(
   }
 }
 
+llvm::SyncScope::ID
+SPIRVTargetCodeGenInfo::getLLVMSyncScopeID(const LangOptions &, SyncScope Scope,
+                                           llvm::AtomicOrdering,
+                                           llvm::LLVMContext &Ctx) const {
+  std::string Name;
+  switch (Scope) {
+  case SyncScope::HIPSingleThread:
+  case SyncScope::SingleScope:
+    Name = "singlethread";
+    break;
----------------
arsenm wrote:

Helper function with direct return of value instead of assign + break pattern? 

https://github.com/llvm/llvm-project/pull/106429


More information about the llvm-commits mailing list