@@ -3307,12 +3307,6 @@ static void handleUseStallEnableClustersAttr(Sema &S, Decl *D,
3307
3307
static void handleSYCLIntelFPGADisableLoopPipeliningAttr (Sema &S, Decl *D,
3308
3308
const ParsedAttr &A) {
3309
3309
S.CheckDeprecatedSYCLAttributeSpelling (A);
3310
-
3311
- // [[intel::disable_loop_pipelining] and [[intel::initiation_interval()]]
3312
- // attributes are incompatible.
3313
- if (checkAttrMutualExclusion<SYCLIntelFPGAInitiationIntervalAttr>(S, D, A))
3314
- return ;
3315
-
3316
3310
D->addAttr (::new (S.Context )
3317
3311
SYCLIntelFPGADisableLoopPipeliningAttr (S.Context , A));
3318
3312
}
@@ -3355,12 +3349,6 @@ void Sema::AddSYCLIntelFPGAInitiationIntervalAttr(Decl *D,
3355
3349
}
3356
3350
}
3357
3351
3358
- // [[intel::disable_loop_pipelining] and [[intel::initiation_interval()]]
3359
- // attributes are incompatible.
3360
- if (checkAttrMutualExclusion<SYCLIntelFPGADisableLoopPipeliningAttr>(*this , D,
3361
- CI))
3362
- return ;
3363
-
3364
3352
D->addAttr (::new (Context)
3365
3353
SYCLIntelFPGAInitiationIntervalAttr (Context, CI, E));
3366
3354
}
@@ -3385,12 +3373,6 @@ Sema::MergeSYCLIntelFPGAInitiationIntervalAttr(
3385
3373
}
3386
3374
}
3387
3375
3388
- // [[intel::initiation_interval()]] and [[intel::disable_loop_pipelining]
3389
- // attributes are incompatible.
3390
- if (checkAttrMutualExclusion<SYCLIntelFPGADisableLoopPipeliningAttr>(*this , D,
3391
- A))
3392
- return nullptr ;
3393
-
3394
3376
return ::new (Context)
3395
3377
SYCLIntelFPGAInitiationIntervalAttr (Context, A, A.getIntervalExpr ());
3396
3378
}
@@ -5802,17 +5784,11 @@ static void handleSYCLIntelNoGlobalWorkOffsetAttr(Sema &S, Decl *D,
5802
5784
S.AddSYCLIntelNoGlobalWorkOffsetAttr (D, A, E);
5803
5785
}
5804
5786
5805
- // / Handle the [[intelfpga::doublepump]] and [[intelfpga::singlepump]] attributes.
5806
- // / One but not both can be specified
5807
- // / Both are incompatible with the __register__ attribute.
5808
- template <typename AttrType, typename IncompatAttrType>
5787
+ // / Handle the [[intelfpga::doublepump]] and [[intelfpga::singlepump]]
5788
+ // / attributes.
5789
+ template <typename AttrType>
5809
5790
static void handleIntelFPGAPumpAttr (Sema &S, Decl *D, const ParsedAttr &A) {
5810
5791
checkForDuplicateAttribute<AttrType>(S, D, A);
5811
- if (checkAttrMutualExclusion<IncompatAttrType>(S, D, A))
5812
- return ;
5813
-
5814
- if (checkAttrMutualExclusion<IntelFPGARegisterAttr>(S, D, A))
5815
- return ;
5816
5792
5817
5793
if (!D->hasAttr <IntelFPGAMemoryAttr>())
5818
5794
D->addAttr (IntelFPGAMemoryAttr::CreateImplicit (
@@ -5867,28 +5843,10 @@ static bool checkIntelFPGARegisterAttrCompatibility(Sema &S, Decl *D,
5867
5843
if (!MA->isImplicit () &&
5868
5844
checkAttrMutualExclusion<IntelFPGAMemoryAttr>(S, D, Attr))
5869
5845
InCompat = true ;
5870
- if (checkAttrMutualExclusion<IntelFPGADoublePumpAttr>(S, D, Attr))
5871
- InCompat = true ;
5872
- if (checkAttrMutualExclusion<IntelFPGASinglePumpAttr>(S, D, Attr))
5873
- InCompat = true ;
5874
- if (checkAttrMutualExclusion<IntelFPGABankWidthAttr>(S, D, Attr))
5875
- InCompat = true ;
5876
- if (checkAttrMutualExclusion<IntelFPGAPrivateCopiesAttr>(S, D, Attr))
5877
- InCompat = true ;
5878
5846
if (auto *NBA = D->getAttr <IntelFPGANumBanksAttr>())
5879
5847
if (!NBA->isImplicit () &&
5880
5848
checkAttrMutualExclusion<IntelFPGANumBanksAttr>(S, D, Attr))
5881
5849
InCompat = true ;
5882
- if (checkAttrMutualExclusion<IntelFPGAMaxReplicatesAttr>(S, D, Attr))
5883
- InCompat = true ;
5884
- if (checkAttrMutualExclusion<IntelFPGASimpleDualPortAttr>(S, D, Attr))
5885
- InCompat = true ;
5886
- if (checkAttrMutualExclusion<IntelFPGAMergeAttr>(S, D, Attr))
5887
- InCompat = true ;
5888
- if (checkAttrMutualExclusion<IntelFPGABankBitsAttr>(S, D, Attr))
5889
- InCompat = true ;
5890
- if (checkAttrMutualExclusion<IntelFPGAForcePow2DepthAttr>(S, D, Attr))
5891
- InCompat = true ;
5892
5850
5893
5851
return InCompat;
5894
5852
}
@@ -5926,9 +5884,6 @@ static void handleIntelFPGASimpleDualPortAttr(Sema &S, Decl *D,
5926
5884
const ParsedAttr &AL) {
5927
5885
checkForDuplicateAttribute<IntelFPGASimpleDualPortAttr>(S, D, AL);
5928
5886
5929
- if (checkAttrMutualExclusion<IntelFPGARegisterAttr>(S, D, AL))
5930
- return ;
5931
-
5932
5887
if (!D->hasAttr <IntelFPGAMemoryAttr>())
5933
5888
D->addAttr (IntelFPGAMemoryAttr::CreateImplicit (
5934
5889
S.Context , IntelFPGAMemoryAttr::Default));
@@ -5973,11 +5928,6 @@ void Sema::AddIntelFPGAMaxReplicatesAttr(Decl *D, const AttributeCommonInfo &CI,
5973
5928
}
5974
5929
}
5975
5930
5976
- // [[intel::fpga_register]] and [[intel::max_replicates()]]
5977
- // attributes are incompatible.
5978
- if (checkAttrMutualExclusion<IntelFPGARegisterAttr>(*this , D, CI))
5979
- return ;
5980
-
5981
5931
// If the declaration does not have an [[intel::fpga_memory]]
5982
5932
// attribute, this creates one as an implicit attribute.
5983
5933
if (!D->hasAttr <IntelFPGAMemoryAttr>())
@@ -6004,10 +5954,6 @@ Sema::MergeIntelFPGAMaxReplicatesAttr(Decl *D,
6004
5954
}
6005
5955
}
6006
5956
}
6007
- // [[intel::fpga_register]] and [[intel::max_replicates()]]
6008
- // attributes are incompatible.
6009
- if (checkAttrMutualExclusion<IntelFPGARegisterAttr>(*this , D, A))
6010
- return nullptr ;
6011
5957
6012
5958
return ::new (Context) IntelFPGAMaxReplicatesAttr (Context, A, A.getValue ());
6013
5959
}
@@ -6026,9 +5972,6 @@ static void handleIntelFPGAMaxReplicatesAttr(Sema &S, Decl *D,
6026
5972
static void handleIntelFPGAMergeAttr (Sema &S, Decl *D, const ParsedAttr &AL) {
6027
5973
checkForDuplicateAttribute<IntelFPGAMergeAttr>(S, D, AL);
6028
5974
6029
- if (checkAttrMutualExclusion<IntelFPGARegisterAttr>(S, D, AL))
6030
- return ;
6031
-
6032
5975
SmallVector<StringRef, 2 > Results;
6033
5976
for (int I = 0 ; I < 2 ; I++) {
6034
5977
StringRef Str;
@@ -6066,9 +6009,6 @@ static void handleIntelFPGABankBitsAttr(Sema &S, Decl *D, const ParsedAttr &A) {
6066
6009
if (!A.checkAtLeastNumArgs (S, 1 ))
6067
6010
return ;
6068
6011
6069
- if (checkAttrMutualExclusion<IntelFPGARegisterAttr>(S, D, A))
6070
- return ;
6071
-
6072
6012
SmallVector<Expr *, 8 > Args;
6073
6013
for (unsigned I = 0 ; I < A.getNumArgs (); ++I) {
6074
6014
Args.push_back (A.getArgAsExpr (I));
@@ -6176,11 +6116,6 @@ void Sema::AddIntelFPGAPrivateCopiesAttr(Decl *D, const AttributeCommonInfo &CI,
6176
6116
}
6177
6117
}
6178
6118
6179
- // [[intel::fpga_register]] and [[intel::private_copies()]]
6180
- // attributes are incompatible.
6181
- if (checkAttrMutualExclusion<IntelFPGARegisterAttr>(*this , D, CI))
6182
- return ;
6183
-
6184
6119
// If the declaration does not have [[intel::memory]]
6185
6120
// attribute, this creates default implicit memory.
6186
6121
if (!D->hasAttr <IntelFPGAMemoryAttr>())
@@ -6234,11 +6169,6 @@ void Sema::AddIntelFPGAForcePow2DepthAttr(Decl *D,
6234
6169
}
6235
6170
}
6236
6171
6237
- // [[intel::fpga_register]] and [[intel::force_pow2_depth()]]
6238
- // attributes are incompatible.
6239
- if (checkAttrMutualExclusion<IntelFPGARegisterAttr>(*this , D, CI))
6240
- return ;
6241
-
6242
6172
// If the declaration does not have an [[intel::fpga_memory]]
6243
6173
// attribute, this creates one as an implicit attribute.
6244
6174
if (!D->hasAttr <IntelFPGAMemoryAttr>())
@@ -6266,11 +6196,6 @@ Sema::MergeIntelFPGAForcePow2DepthAttr(Decl *D,
6266
6196
}
6267
6197
}
6268
6198
6269
- // [[intel::fpga_register]] and [[intel::force_pow2_depth()]]
6270
- // attributes are incompatible.
6271
- if (checkAttrMutualExclusion<IntelFPGARegisterAttr>(*this , D, A))
6272
- return nullptr ;
6273
-
6274
6199
return ::new (Context) IntelFPGAForcePow2DepthAttr (Context, A, A.getValue ());
6275
6200
}
6276
6201
@@ -9571,12 +9496,10 @@ static void ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D,
9571
9496
9572
9497
// Intel FPGA specific attributes
9573
9498
case ParsedAttr::AT_IntelFPGADoublePump:
9574
- handleIntelFPGAPumpAttr<IntelFPGADoublePumpAttr, IntelFPGASinglePumpAttr>(
9575
- S, D, AL);
9499
+ handleIntelFPGAPumpAttr<IntelFPGADoublePumpAttr>(S, D, AL);
9576
9500
break ;
9577
9501
case ParsedAttr::AT_IntelFPGASinglePump:
9578
- handleIntelFPGAPumpAttr<IntelFPGASinglePumpAttr, IntelFPGADoublePumpAttr>(
9579
- S, D, AL);
9502
+ handleIntelFPGAPumpAttr<IntelFPGASinglePumpAttr>(S, D, AL);
9580
9503
break ;
9581
9504
case ParsedAttr::AT_IntelFPGAMemory:
9582
9505
handleIntelFPGAMemoryAttr (S, D, AL);
0 commit comments