Skip to content

Commit 7f6909f

Browse files
authored
[SYCL][FPGA] Change "slave" to "agent" (#3494)
All the instances of slave have been changed to agent following inclusivity guidelines. Lit tests pass with the changes. IntelFPGALocalStaticSlaveMemVar has been deprecated.
1 parent f1a0a58 commit 7f6909f

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

clang/include/clang/Basic/Attr.td

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1999,12 +1999,12 @@ def IntelFPGAConstVar : SubsetSubject<Var,
19991999
LangAS::opencl_constant)}],
20002000
"constant variables">;
20012001

2002-
def IntelFPGALocalStaticSlaveMemVar : SubsetSubject<Var,
2002+
def IntelFPGALocalStaticAgentMemVar : SubsetSubject<Var,
20032003
[{S->getKind() != Decl::ImplicitParam &&
20042004
S->getKind() != Decl::NonTypeTemplateParm &&
2005-
(S->getStorageClass() == SC_Static ||
2006-
S->hasLocalStorage())}],
2007-
"local variables, static variables, slave memory arguments">;
2005+
(S->getStorageClass() == SC_Static ||
2006+
S->hasLocalStorage())}],
2007+
"local variables, static variables, agent memory arguments">;
20082008

20092009
def IntelFPGALocalOrStaticVar : SubsetSubject<Var,
20102010
[{S->getKind() != Decl::ImplicitParam &&
@@ -2047,7 +2047,7 @@ def IntelFPGAMemory : Attr {
20472047
}
20482048
}
20492049
}];
2050-
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticSlaveMemVar,
2050+
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticAgentMemVar,
20512051
Field], ErrorDiag>;
20522052
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
20532053
let Documentation = [IntelFPGAMemoryAttrDocs];
@@ -2067,7 +2067,7 @@ def IntelFPGABankWidth : Attr {
20672067
let Spellings = [CXX11<"intelfpga","bankwidth">,
20682068
CXX11<"intel","bankwidth">];
20692069
let Args = [ExprArgument<"Value">];
2070-
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticSlaveMemVar,
2070+
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticAgentMemVar,
20712071
Field], ErrorDiag>;
20722072
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
20732073
let Documentation = [IntelFPGABankWidthAttrDocs];
@@ -2077,7 +2077,7 @@ def IntelFPGANumBanks : Attr {
20772077
let Spellings = [CXX11<"intelfpga","numbanks">,
20782078
CXX11<"intel","numbanks">];
20792079
let Args = [ExprArgument<"Value">];
2080-
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticSlaveMemVar,
2080+
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticAgentMemVar,
20812081
Field], ErrorDiag>;
20822082
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
20832083
let Documentation = [IntelFPGANumBanksAttrDocs];
@@ -2107,7 +2107,7 @@ def IntelFPGAMaxReplicates : InheritableAttr {
21072107
let Spellings = [CXX11<"intelfpga","max_replicates">,
21082108
CXX11<"intel","max_replicates">];
21092109
let Args = [ExprArgument<"Value">];
2110-
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticSlaveMemVar,
2110+
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticAgentMemVar,
21112111
Field], ErrorDiag>;
21122112
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
21132113
let Documentation = [IntelFPGAMaxReplicatesAttrDocs];
@@ -2116,7 +2116,7 @@ def IntelFPGAMaxReplicates : InheritableAttr {
21162116
def IntelFPGASimpleDualPort : Attr {
21172117
let Spellings = [CXX11<"intelfpga","simple_dual_port">,
21182118
CXX11<"intel","simple_dual_port">];
2119-
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticSlaveMemVar,
2119+
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticAgentMemVar,
21202120
Field], ErrorDiag>;
21212121
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
21222122
let Documentation = [IntelFPGASimpleDualPortAttrDocs];
@@ -2142,7 +2142,7 @@ def IntelFPGABankBits : Attr {
21422142
let Spellings = [CXX11<"intelfpga", "bank_bits">,
21432143
CXX11<"intel", "bank_bits">];
21442144
let Args = [VariadicExprArgument<"Args">];
2145-
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticSlaveMemVar,
2145+
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticAgentMemVar,
21462146
Field], ErrorDiag>;
21472147
let LangOpts = [SYCLIsDevice, SYCLIsHost];
21482148
let Documentation = [IntelFPGABankBitsDocs];
@@ -2152,7 +2152,7 @@ def IntelFPGAForcePow2Depth : InheritableAttr {
21522152
let Spellings = [CXX11<"intelfpga","force_pow2_depth">,
21532153
CXX11<"intel","force_pow2_depth">];
21542154
let Args = [ExprArgument<"Value">];
2155-
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticSlaveMemVar,
2155+
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticAgentMemVar,
21562156
Field], ErrorDiag>;
21572157
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
21582158
let Documentation = [IntelFPGAForcePow2DepthAttrDocs];

clang/test/SemaSYCL/intel-fpga-local.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ void attr_on_const_error()
680680
//expected-error@+1{{attribute only applies to local non-const variables and non-static data members}}
681681
void attr_on_func_arg([[intel::private_copies(8)]] int pc) {}
682682

683-
//expected-error@+1{{attribute only applies to constant variables, local variables, static variables, slave memory arguments, and non-static data members}}
683+
//expected-error@+1{{attribute only applies to constant variables, local variables, static variables, agent memory arguments, and non-static data members}}
684684
[[intel::force_pow2_depth(0)]]
685685
__attribute__((opencl_global)) unsigned int ocl_glob_force_p2d[64] = {1, 2, 3};
686686

0 commit comments

Comments
 (0)