[clang] [llvm] [AMDGPU] Add amdgpu-as MMRA for fences (PR #78572)
Sameer Sahasrabuddhe via cfe-commits
cfe-commits at lists.llvm.org
Sun May 5 21:39:38 PDT 2024
================
@@ -678,6 +679,59 @@ class SIMemoryLegalizer final : public MachineFunctionPass {
bool runOnMachineFunction(MachineFunction &MF) override;
};
+static std::array<std::pair<StringLiteral, SIAtomicAddrSpace>, 3> ASNames = {{
+ {"global", SIAtomicAddrSpace::GLOBAL},
+ {"local", SIAtomicAddrSpace::LDS},
+ {"image", SIAtomicAddrSpace::SCRATCH},
+}};
+
+void diagnoseUnknownMMRAASName(const MachineInstr &MI, StringRef AS) {
+ const MachineFunction *MF = MI.getMF();
+ const Function &Fn = MF->getFunction();
+ std::string Str;
+ raw_string_ostream OS(Str);
+ OS << "unknown address space '" << AS << "'; expected one of ";
+ bool IsFirst = true;
----------------
ssahasra wrote:
Use ListSeparator from StringExtras.h
https://github.com/llvm/llvm-project/pull/78572
More information about the cfe-commits
mailing list