================ @@ -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( + cir::LangAddressSpace addrSpace) const override { + switch (addrSpace) { + case cir::LangAddressSpace::Default: + return 0; ---------------- arsenm wrote:
Use the enums from llvm/Support/AMDGPUAddrSpace.h https://github.com/llvm/llvm-project/pull/179084 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
