[clang] [CIR][CUDA] Handle local, __device__, __shared__, and __constant__ variables (PR #184248)
Zaky Hermawan via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 10 17:48:25 PDT 2026
================
@@ -99,6 +106,15 @@ class TargetCIRGenInfo {
/// right thing when calling a function with no know signature.
virtual bool isNoProtoCallVariadic(const FunctionNoProtoType *fnType) const;
+ /// Provides a convenient hook to handle extra target-specific attributes
+ /// for the given global.
+ /// In OG, the function receives an llvm::GlobalValue. However, functions
+ /// and global variables are separate types in Clang IR, so we use a general
+ /// mlir::Operation*.
+ virtual void setTargetAttributes(const clang::Decl *decl,
----------------
ZakyHermawan wrote:
This one cannot be deleted because it is used [here](https://github.com/llvm/llvm-project/pull/184248/changes#diff-81bc6cc583448bc99c35a497c37b89c731016a4ea02dd0a1c64763d5f0e9e117R803).
https://github.com/llvm/llvm-project/pull/184248
More information about the cfe-commits
mailing list