[llvm-branch-commits] [clang] [CIR][AMDGPU] Lower Language specific address spaces and implement AMDGPU target (PR #179084)

Matt Arsenault via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Mar 13 05:54:04 PDT 2026


================
@@ -0,0 +1,47 @@
+//===- AMDGPU.cpp - Emit CIR for AMDGPU -----------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "../TargetLoweringInfo.h"
+#include "clang/CIR/Dialect/IR/CIROpsEnums.h"
+#include "llvm/Support/ErrorHandling.h"
+
+namespace cir {
+
+namespace {
+
+class AMDGPUTargetLoweringInfo : public TargetLoweringInfo {
+public:
+  // Address space mapping from:
+  // https://llvm.org/docs/AMDGPUUsage.html#address-spaces
+  unsigned getTargetAddrSpaceFromCIRAddrSpace(
----------------
arsenm wrote:

I think this should be a table rather than a switch 

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


More information about the llvm-branch-commits mailing list