@@ -3419,7 +3419,7 @@ static bool InvalidWorkGroupSizeAttrs(const Expr *MGValue, const Expr *XDim,
3419
3419
// with 'max_work_group_size' attribute, check to see if values of
3420
3420
// 'reqd_work_group_size' attribute arguments are equal and less than values of
3421
3421
// 'max_work_group_size' attribute arguments.
3422
- static bool checkWorkGroupSizeAttrValues (
3422
+ static bool checkMaxAllowedWorkGroupSize (
3423
3423
Sema &S, const Expr *RWGSXDim, const Expr *RWGSYDim, const Expr *RWGSZDim,
3424
3424
const Expr *MWGSXDim, const Expr *MWGSYDim, const Expr *MWGSZDim) {
3425
3425
// If any of the operand is still value dependent, we can't test anything.
@@ -3507,7 +3507,7 @@ void Sema::AddSYCLIntelMaxWorkGroupSizeAttr(Decl *D,
3507
3507
// __attribute__((reqd_work_group_size)) is only available in OpenCL mode
3508
3508
// and follows the OpenCL rules.
3509
3509
if (const auto *DeclAttr = D->getAttr<ReqdWorkGroupSizeAttr>()) {
3510
- if (checkWorkGroupSizeAttrValues (*this , DeclAttr->getXDim (),
3510
+ if (checkMaxAllowedWorkGroupSize (*this, DeclAttr->getXDim(),
3511
3511
DeclAttr->getYDim(), DeclAttr->getZDim(),
3512
3512
XDim, YDim, ZDim)) {
3513
3513
Diag(CI.getLoc(), diag::err_conflicting_sycl_function_attributes)
@@ -3595,7 +3595,7 @@ SYCLIntelMaxWorkGroupSizeAttr *Sema::MergeSYCLIntelMaxWorkGroupSizeAttr(
3595
3595
// __attribute__((reqd_work_group_size)) is only available in OpenCL mode
3596
3596
// and follows the OpenCL rules.
3597
3597
if (const auto *DeclAttr = D->getAttr<ReqdWorkGroupSizeAttr>()) {
3598
- if (checkWorkGroupSizeAttrValues (*this , DeclAttr->getXDim (),
3598
+ if (checkMaxAllowedWorkGroupSize (*this, DeclAttr->getXDim(),
3599
3599
DeclAttr->getYDim(), DeclAttr->getZDim(),
3600
3600
A.getXDim(), A.getYDim(), A.getZDim())) {
3601
3601
Diag(DeclAttr->getLoc(), diag::err_conflicting_sycl_function_attributes)
@@ -3720,7 +3720,7 @@ void Sema::AddReqdWorkGroupSizeAttr(Decl *D, const AttributeCommonInfo &CI,
3720
3720
// mode. All spellings of reqd_work_group_size attribute (regardless of
3721
3721
// syntax used) follow the SYCL rules when in SYCL mode.
3722
3722
if (const auto *DeclAttr = D->getAttr<SYCLIntelMaxWorkGroupSizeAttr>()) {
3723
- if (checkWorkGroupSizeAttrValues (*this , XDim, YDim, ZDim,
3723
+ if (checkMaxAllowedWorkGroupSize (*this, XDim, YDim, ZDim,
3724
3724
DeclAttr->getXDim(), DeclAttr->getYDim(),
3725
3725
DeclAttr->getZDim())) {
3726
3726
Diag(CI.getLoc(), diag::err_conflicting_sycl_function_attributes)
@@ -3810,7 +3810,7 @@ Sema::MergeReqdWorkGroupSizeAttr(Decl *D, const ReqdWorkGroupSizeAttr &A) {
3810
3810
// mode. All spellings of reqd_work_group_size attribute (regardless of
3811
3811
// syntax used) follow the SYCL rules when in SYCL mode.
3812
3812
if (const auto *DeclAttr = D->getAttr<SYCLIntelMaxWorkGroupSizeAttr>()) {
3813
- if (checkWorkGroupSizeAttrValues (
3813
+ if (checkMaxAllowedWorkGroupSize (
3814
3814
*this, A.getXDim(), A.getYDim(), A.getZDim(), DeclAttr->getXDim(),
3815
3815
DeclAttr->getYDim(), DeclAttr->getZDim())) {
3816
3816
Diag(DeclAttr->getLoc(), diag::err_conflicting_sycl_function_attributes)
0 commit comments