File indexing completed on 2026-05-10 08:37:04
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef LLVM_CLANG_SEMA_SEMAAMDGPU_H
0014 #define LLVM_CLANG_SEMA_SEMAAMDGPU_H
0015
0016 #include "clang/AST/ASTFwd.h"
0017 #include "clang/Sema/SemaBase.h"
0018
0019 namespace clang {
0020 class AttributeCommonInfo;
0021 class ParsedAttr;
0022
0023 class SemaAMDGPU : public SemaBase {
0024 public:
0025 SemaAMDGPU(Sema &S);
0026
0027 bool CheckAMDGCNBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall);
0028
0029 bool checkMovDPPFunctionCall(CallExpr *TheCall, unsigned NumArgs,
0030 unsigned NumDataArgs);
0031
0032
0033 AMDGPUFlatWorkGroupSizeAttr *
0034 CreateAMDGPUFlatWorkGroupSizeAttr(const AttributeCommonInfo &CI, Expr *Min,
0035 Expr *Max);
0036
0037
0038
0039 void addAMDGPUFlatWorkGroupSizeAttr(Decl *D, const AttributeCommonInfo &CI,
0040 Expr *Min, Expr *Max);
0041
0042
0043 AMDGPUWavesPerEUAttr *
0044 CreateAMDGPUWavesPerEUAttr(const AttributeCommonInfo &CI, Expr *Min,
0045 Expr *Max);
0046
0047
0048
0049 void addAMDGPUWavesPerEUAttr(Decl *D, const AttributeCommonInfo &CI,
0050 Expr *Min, Expr *Max);
0051
0052
0053 AMDGPUMaxNumWorkGroupsAttr *
0054 CreateAMDGPUMaxNumWorkGroupsAttr(const AttributeCommonInfo &CI, Expr *XExpr,
0055 Expr *YExpr, Expr *ZExpr);
0056
0057
0058
0059 void addAMDGPUMaxNumWorkGroupsAttr(Decl *D, const AttributeCommonInfo &CI,
0060 Expr *XExpr, Expr *YExpr, Expr *ZExpr);
0061
0062 void handleAMDGPUWavesPerEUAttr(Decl *D, const ParsedAttr &AL);
0063 void handleAMDGPUNumSGPRAttr(Decl *D, const ParsedAttr &AL);
0064 void handleAMDGPUNumVGPRAttr(Decl *D, const ParsedAttr &AL);
0065 void handleAMDGPUMaxNumWorkGroupsAttr(Decl *D, const ParsedAttr &AL);
0066 void handleAMDGPUFlatWorkGroupSizeAttr(Decl *D, const ParsedAttr &AL);
0067 };
0068 }
0069
0070 #endif