@@ -236,6 +236,10 @@ class DefaultIntArgument<string name, int default> : IntArgument<name, 1> {
236
236
int Default = default;
237
237
}
238
238
239
+ class DefaultUnsignedArgument<string name, int default> : UnsignedArgument<name, 1> {
240
+ int Default = default;
241
+ }
242
+
239
243
// This argument is more complex, it includes the enumerator type name,
240
244
// a list of strings to accept, and a list of enumerators to map them to.
241
245
class EnumArgument<string name, string type, list<string> values,
@@ -1676,6 +1680,57 @@ def SYCLIntelFPGAMaxConcurrency : Attr {
1676
1680
let Documentation = [SYCLIntelFPGAMaxConcurrencyAttrDocs];
1677
1681
}
1678
1682
1683
+ def SYCLIntelFPGALoopCoalesce : Attr {
1684
+ let Spellings = [CXX11<"intelfpga","loop_coalesce">];
1685
+ let Args = [ExprArgument<"NExpr">];
1686
+ let LangOpts = [SYCLIsDevice, SYCLIsHost];
1687
+ let HasCustomTypeTransform = 1;
1688
+ let AdditionalMembers = [{
1689
+ static const char *getName() {
1690
+ return "loop_coalesce";
1691
+ }
1692
+ }];
1693
+ let Documentation = [SYCLIntelFPGALoopCoalesceAttrDocs];
1694
+ }
1695
+
1696
+ def SYCLIntelFPGADisableLoopPipelining : Attr {
1697
+ let Spellings = [CXX11<"intelfpga","disable_loop_pipelining">];
1698
+ let LangOpts = [SYCLIsDevice, SYCLIsHost];
1699
+ let HasCustomTypeTransform = 1;
1700
+ let AdditionalMembers = [{
1701
+ static const char *getName() {
1702
+ return "disable_loop_pipelining";
1703
+ }
1704
+ }];
1705
+ let Documentation = [SYCLIntelFPGADisableLoopPipeliningAttrDocs];
1706
+ }
1707
+
1708
+ def SYCLIntelFPGAMaxInterleaving : Attr {
1709
+ let Spellings = [CXX11<"intelfpga","max_interleaving">];
1710
+ let Args = [ExprArgument<"NExpr">];
1711
+ let LangOpts = [SYCLIsDevice, SYCLIsHost];
1712
+ let HasCustomTypeTransform = 1;
1713
+ let AdditionalMembers = [{
1714
+ static const char *getName() {
1715
+ return "max_interleaving";
1716
+ }
1717
+ }];
1718
+ let Documentation = [SYCLIntelFPGAMaxInterleavingAttrDocs];
1719
+ }
1720
+
1721
+ def SYCLIntelFPGASpeculatedIterations : Attr {
1722
+ let Spellings = [CXX11<"intelfpga","speculated_iterations">];
1723
+ let Args = [ExprArgument<"NExpr">];
1724
+ let LangOpts = [SYCLIsDevice, SYCLIsHost];
1725
+ let HasCustomTypeTransform = 1;
1726
+ let AdditionalMembers = [{
1727
+ static const char *getName() {
1728
+ return "speculated_iterations";
1729
+ }
1730
+ }];
1731
+ let Documentation = [SYCLIntelFPGASpeculatedIterationsAttrDocs];
1732
+ }
1733
+
1679
1734
def IntelFPGALocalNonConstVar : SubsetSubject<Var,
1680
1735
[{S->hasLocalStorage() &&
1681
1736
S->getKind() != Decl::ImplicitParam &&
@@ -2471,13 +2526,16 @@ def NoDeref : TypeAttr {
2471
2526
let Documentation = [NoDerefDocs];
2472
2527
}
2473
2528
2529
+ // Default arguments in ReqWorkGroupSize can be used only with
2530
+ // intel::reqd_work_group_size spelling.
2474
2531
def ReqdWorkGroupSize : InheritableAttr {
2475
2532
let Spellings = [GNU<"reqd_work_group_size">,
2476
- CXX11<"cl","reqd_work_group_size">];
2477
- let Args = [UnsignedArgument<"XDim">, UnsignedArgument<"YDim">,
2478
- UnsignedArgument<"ZDim">];
2533
+ CXX11<"intel","reqd_work_group_size">,
2534
+ CXX11<"cl","reqd_work_group_size">];
2535
+ let Args = [UnsignedArgument<"XDim">, DefaultUnsignedArgument<"YDim", 1>,
2536
+ DefaultUnsignedArgument<"ZDim", 1>];
2479
2537
let Subjects = SubjectList<[Function], ErrorDiag>;
2480
- let Documentation = [Undocumented ];
2538
+ let Documentation = [ReqdWorkGroupSizeAttrDocs ];
2481
2539
}
2482
2540
2483
2541
def WorkGroupSizeHint : InheritableAttr {
0 commit comments