@@ -2890,9 +2890,6 @@ static bool checkWorkGroupSizeValues(Sema &S, Decl *D, const ParsedAttr &Attr,
2890
2890
if (const auto *A = D->getAttr <ReqdWorkGroupSizeAttr>())
2891
2891
Result &= checkZeroDim (A, A->getXDim (), A->getYDim (), A->getZDim ());
2892
2892
return Result;
2893
- if (const auto *A = D->getAttr <SYCLIntelReqdWorkGroupSizeAttr>())
2894
- Result &= checkZeroDim (A, A->getXDim (), A->getYDim (), A->getZDim ());
2895
- return Result;
2896
2893
}
2897
2894
2898
2895
if (const auto *A = D->getAttr <SYCLIntelMaxGlobalWorkDimAttr>())
@@ -2916,14 +2913,6 @@ static bool checkWorkGroupSizeValues(Sema &S, Decl *D, const ParsedAttr &Attr,
2916
2913
Result &= false ;
2917
2914
}
2918
2915
}
2919
- if (const auto *A = D->getAttr <SYCLIntelReqdWorkGroupSizeAttr>()) {
2920
- if (!(WGSize[0 ] >= A->getXDim () && WGSize[1 ] >= A->getYDim () &&
2921
- WGSize[2 ] >= A->getZDim ())) {
2922
- S.Diag (Attr.getLoc (), diag::err_conflicting_sycl_function_attributes)
2923
- << Attr << A->getSpelling ();
2924
- Result &= false ;
2925
- }
2926
- }
2927
2916
return Result;
2928
2917
}
2929
2918
@@ -2935,13 +2924,15 @@ static void handleWorkGroupSize(Sema &S, Decl *D, const ParsedAttr &AL) {
2935
2924
return ;
2936
2925
2937
2926
uint32_t WGSize[3 ];
2938
- if (std::is_same<WorkGroupAttr, SYCLIntelReqdWorkGroupSizeAttr>::value) {
2939
- WGSize[1 ] = SYCLIntelReqdWorkGroupSizeAttr::DefaultYDim;
2940
- WGSize[2 ] = SYCLIntelReqdWorkGroupSizeAttr::DefaultZDim;
2941
- }
2927
+ if (AL.getNormalizedFullName () == " intel::reqd_work_group_size" ) {
2928
+ WGSize[1 ] = ReqdWorkGroupSizeAttr::DefaultYDim;
2929
+ WGSize[2 ] = ReqdWorkGroupSizeAttr::DefaultZDim;
2930
+ } else if (!checkAttributeNumArgs (S, AL, 3 ))
2931
+ return ;
2932
+
2942
2933
for (unsigned i = 0 ; i < 3 ; ++i) {
2943
2934
if (i < AL.getNumArgs ())
2944
- if (!checkUInt32Argument (S, AL, AL.getArgAsExpr (i), WGSize[i], i,
2935
+ if (!checkUInt32Argument (S, AL, AL.getArgAsExpr (i), WGSize[i], i,
2945
2936
/* StrictlyUnsigned=*/ true ))
2946
2937
return ;
2947
2938
if (WGSize[i] == 0 ) {
@@ -7677,9 +7668,6 @@ static void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D,
7677
7668
case ParsedAttr::AT_ReqdWorkGroupSize:
7678
7669
handleWorkGroupSize<ReqdWorkGroupSizeAttr>(S, D, AL);
7679
7670
break ;
7680
- case ParsedAttr::AT_SYCLIntelReqdWorkGroupSize:
7681
- handleWorkGroupSize<SYCLIntelReqdWorkGroupSizeAttr>(S, D, AL);
7682
- break ;
7683
7671
case ParsedAttr::AT_SYCLIntelMaxWorkGroupSize:
7684
7672
handleWorkGroupSize<SYCLIntelMaxWorkGroupSizeAttr>(S, D, AL);
7685
7673
break ;
@@ -8182,9 +8170,6 @@ void Sema::ProcessDeclAttributeList(Scope *S, Decl *D,
8182
8170
// diag::err_attribute_wrong_decl_type + ExpectedKernelFunction.
8183
8171
Diag (D->getLocation (), diag::err_opencl_kernel_attr) << A;
8184
8172
D->setInvalidDecl ();
8185
- } else if (const auto *A = D->getAttr <SYCLIntelReqdWorkGroupSizeAttr>()) {
8186
- Diag (D->getLocation (), diag::err_opencl_kernel_attr) << A;
8187
- D->setInvalidDecl ();
8188
8173
} else if (const auto *A = D->getAttr <WorkGroupSizeHintAttr>()) {
8189
8174
Diag (D->getLocation (), diag::err_opencl_kernel_attr) << A;
8190
8175
D->setInvalidDecl ();
0 commit comments