[clang] [llvm] [AMDGPU][GFX12.5] Reimplement monitor load as an atomic operation (PR #177343)

Pierre van Houtryve via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 5 05:03:34 PST 2026


================
@@ -131,42 +131,13 @@ class SPIRVTargetCodeGenInfo : public CommonSPIRTargetCodeGenInfo {
                                   const VarDecl *D) const override;
   void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
                            CodeGen::CodeGenModule &M) const override;
-  llvm::SyncScope::ID getLLVMSyncScopeID(const LangOptions &LangOpts,
-                                         SyncScope Scope,
-                                         llvm::AtomicOrdering Ordering,
-                                         llvm::LLVMContext &Ctx) const override;
+  std::string getLLVMSyncScopeStr(const LangOptions &LangOpts, SyncScope Scope,
----------------
Pierre-vh wrote:

The AMDGPU implementation appends one-as to the string, so it can't return a `StringRef`.
What I could do instead is either change the implementation to write to something like a `SmallString` out parameter, or refactor the AMDGPU implementation to avoid appending to the string (it might make it a bit more messy though).

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


More information about the cfe-commits mailing list