================ @@ -0,0 +1,268 @@ +//===---- AMDGPU.cpp - AMDGPU-specific CIR CodeGen ------------------------===// +// +// 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 +// +//===----------------------------------------------------------------------===// +// +// This provides AMDGPU-specific CIR CodeGen logic for function attributes. +// +//===----------------------------------------------------------------------===// + +#include "../CIRGenModule.h" +#include "../TargetInfo.h" + +#include "clang/AST/Attr.h" +#include "clang/AST/Decl.h" +#include "clang/Basic/TargetInfo.h" +#include "clang/CIR/Dialect/IR/CIRDialect.h" +#include "llvm/ADT/StringExtras.h" +#include "llvm/Support/raw_ostream.h" + +using namespace clang; +using namespace clang::CIRGen; + +namespace { + +/// Check if AMDGPU protected visibility is required. +static bool requiresAMDGPUProtectedVisibility(const clang::Decl *d, + cir::FuncOp func) { + if (func.getGlobalVisibility() != cir::VisibilityKind::Hidden) + return false; + + if (d->hasAttr<OMPDeclareTargetDeclAttr>()) + return false; + + return d->hasAttr<DeviceKernelAttr>() || ---------------- skc7 wrote:
Followed OGCG and updated this aswell. Thanks for feedback. https://github.com/llvm/llvm-project/pull/188007 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
