Skip to content

[SYCL][FPGA] Changing "slave" to "agent" #3494

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions clang/include/clang/Basic/Attr.td
Original file line number Diff line number Diff line change
Expand Up @@ -1971,12 +1971,12 @@ def IntelFPGAConstVar : SubsetSubject<Var,
LangAS::opencl_constant)}],
"constant variables">;

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

def IntelFPGALocalOrStaticVar : SubsetSubject<Var,
[{S->getKind() != Decl::ImplicitParam &&
Expand Down Expand Up @@ -2019,7 +2019,7 @@ def IntelFPGAMemory : Attr {
}
}
}];
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticSlaveMemVar,
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticAgentMemVar,
Field], ErrorDiag>;
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
let Documentation = [IntelFPGAMemoryAttrDocs];
Expand All @@ -2039,7 +2039,7 @@ def IntelFPGABankWidth : Attr {
let Spellings = [CXX11<"intelfpga","bankwidth">,
CXX11<"intel","bankwidth">];
let Args = [ExprArgument<"Value">];
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticSlaveMemVar,
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticAgentMemVar,
Field], ErrorDiag>;
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
let Documentation = [IntelFPGABankWidthAttrDocs];
Expand All @@ -2049,7 +2049,7 @@ def IntelFPGANumBanks : Attr {
let Spellings = [CXX11<"intelfpga","numbanks">,
CXX11<"intel","numbanks">];
let Args = [ExprArgument<"Value">];
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticSlaveMemVar,
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticAgentMemVar,
Field], ErrorDiag>;
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
let Documentation = [IntelFPGANumBanksAttrDocs];
Expand Down Expand Up @@ -2079,7 +2079,7 @@ def IntelFPGAMaxReplicates : InheritableAttr {
let Spellings = [CXX11<"intelfpga","max_replicates">,
CXX11<"intel","max_replicates">];
let Args = [ExprArgument<"Value">];
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticSlaveMemVar,
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticAgentMemVar,
Field], ErrorDiag>;
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
let Documentation = [IntelFPGAMaxReplicatesAttrDocs];
Expand All @@ -2088,7 +2088,7 @@ def IntelFPGAMaxReplicates : InheritableAttr {
def IntelFPGASimpleDualPort : Attr {
let Spellings = [CXX11<"intelfpga","simple_dual_port">,
CXX11<"intel","simple_dual_port">];
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticSlaveMemVar,
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticAgentMemVar,
Field], ErrorDiag>;
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
let Documentation = [IntelFPGASimpleDualPortAttrDocs];
Expand All @@ -2114,7 +2114,7 @@ def IntelFPGABankBits : Attr {
let Spellings = [CXX11<"intelfpga", "bank_bits">,
CXX11<"intel", "bank_bits">];
let Args = [VariadicExprArgument<"Args">];
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticSlaveMemVar,
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticAgentMemVar,
Field], ErrorDiag>;
let LangOpts = [SYCLIsDevice, SYCLIsHost];
let Documentation = [IntelFPGABankBitsDocs];
Expand All @@ -2124,7 +2124,7 @@ def IntelFPGAForcePow2Depth : InheritableAttr {
let Spellings = [CXX11<"intelfpga","force_pow2_depth">,
CXX11<"intel","force_pow2_depth">];
let Args = [ExprArgument<"Value">];
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticSlaveMemVar,
let Subjects = SubjectList<[IntelFPGAConstVar, IntelFPGALocalStaticAgentMemVar,
Field], ErrorDiag>;
let LangOpts = [SYCLIsDevice, SilentlyIgnoreSYCLIsHost];
let Documentation = [IntelFPGAForcePow2DepthAttrDocs];
Expand Down
2 changes: 1 addition & 1 deletion clang/test/SemaSYCL/intel-fpga-local.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ void attr_on_const_error()
//expected-error@+1{{attribute only applies to local non-const variables and non-static data members}}
void attr_on_func_arg([[intel::private_copies(8)]] int pc) {}

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

Expand Down