[PATCH] D135060: [HLSL] Add groupshare address space.

2022-10-20 Thread Xiang Li via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. python3kgae marked an inline comment as done. Closed by commit rG7e04c0ad6325: [HLSL] Add groupshare address space. (authored by python3kgae). Changed prior to commit:

[PATCH] D135060: [HLSL] Add groupshare address space.

2022-10-20 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/test/ParserHLSL/group_shared_202x.hlsl:5-6 + +// expected-error@+1 {{return type cannot be qualified with address space}} +auto l = []()

[PATCH] D135060: [HLSL] Add groupshare address space.

2022-10-19 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked 3 inline comments as done. python3kgae added inline comments. Comment at: clang/test/ParserHLSL/group_shared_202x.hlsl:5-6 + +// expected-error@+1 {{return type cannot be qualified with address space}} +auto l = []() -> groupshared void {}; +//

[PATCH] D135060: [HLSL] Add groupshare address space.

2022-10-19 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 469048. python3kgae added a comment. Update comments and add more test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135060/new/ https://reviews.llvm.org/D135060 Files:

[PATCH] D135060: [HLSL] Add groupshare address space.

2022-10-19 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:10083 } +// HLSL not support address space on a function return type declaration. +LangAS AddressSpace = NewFD->getReturnType().getAddressSpace();

[PATCH] D135060: [HLSL] Add groupshare address space.

2022-10-13 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 467383. python3kgae marked an inline comment as done. python3kgae added a comment. Add hlsl202x test for C++ 11 features like lambda. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135060/new/

[PATCH] D135060: [HLSL] Add groupshare address space.

2022-10-13 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked 2 inline comments as done. python3kgae added inline comments. Comment at: clang/test/ParserHLSL/group_shared.hlsl:11 +// expected-warning@+1 {{'auto' type specifier is a C++11 extension}} +auto l = []() groupshared {}; + beanz wrote: > What

[PATCH] D135060: [HLSL] Add groupshare address space.

2022-10-12 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/test/ParserHLSL/group_shared.hlsl:11 +// expected-warning@+1 {{'auto' type specifier is a C++11 extension}} +auto l = []() groupshared {}; + What happens to this if you set the language standard to hlsl 202x? I

[PATCH] D135060: [HLSL] Add groupshare address space.

2022-10-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae marked 2 inline comments as done. python3kgae added inline comments. Comment at: clang/test/SemaHLSL/group_shared.hlsl:57 + // expected-error@+1 {{no matching function for call to 'tfoo'}} + GSF gs2 = tfoo(gs); aaron.ballman wrote: > Some other Sema

[PATCH] D135060: [HLSL] Add groupshare address space.

2022-10-12 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 467285. python3kgae marked 2 inline comments as done. python3kgae added a comment. Add SubjectList<[Var]> and add tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135060/new/

[PATCH] D135060: [HLSL] Add groupshare address space.

2022-10-12 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Basic/Attr.td:4063 + let Spellings = [Keyword<"groupshared">]; + let Documentation = [HLSLGroupSharedAddressSpaceDocs]; +} Shouldn't this have `let Subjects = SubjectList<[Var]>;`? I don't think we

[PATCH] D135060: [HLSL] Add groupshare address space.

2022-10-12 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:10299 Error<"attribute %0 can only be applied to an OpenCL kernel function">; -def err_opencl_return_value_with_address_space : Error< - "return value cannot be qualified with

[PATCH] D135060: [HLSL] Add groupshare address space.

2022-10-11 Thread Xiang Li via Phabricator via cfe-commits
python3kgae added inline comments. Comment at: clang/include/clang/Basic/Attr.td:4045 +def HLSLGroupSharedAddressSpace : TypeAttr { + let Spellings = [Keyword<"groupshared">, Clang<"groupshared">]; + let Documentation = [HLSLGroupSharedAddressSpaceDocs];

[PATCH] D135060: [HLSL] Add groupshare address space.

2022-10-11 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 466925. python3kgae marked 12 inline comments as done. python3kgae added a comment. Code cleanup to match comments. Reuse opencl error. Fix typo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135060/new/

[PATCH] D135060: [HLSL] Add groupshare address space.

2022-10-11 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. At a high-level: can you make sure that functional changes all have corresponding test coverage? Comment at: clang/include/clang/Basic/Attr.td:4045 +def HLSLGroupSharedAddressSpace : TypeAttr { + let Spellings = [Keyword<"groupshared">,

[PATCH] D135060: [HLSL] Add groupshare address space.

2022-10-09 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 466382. python3kgae added a comment. Change Category to DocCatVariable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135060/new/ https://reviews.llvm.org/D135060 Files:

[PATCH] D135060: [HLSL] Add groupshare address space.

2022-10-06 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 465661. python3kgae added a comment. Fix test fail caused by max address space change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135060/new/ https://reviews.llvm.org/D135060 Files:

[PATCH] D135060: [HLSL] Add groupshare address space.

2022-10-05 Thread Xiang Li via Phabricator via cfe-commits
python3kgae updated this revision to Diff 465628. python3kgae added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135060/new/ https://reviews.llvm.org/D135060 Files: clang/include/clang/Basic/AddressSpaces.h

[PATCH] D135060: [HLSL] Add groupshare address space.

2022-10-03 Thread Xiang Li via Phabricator via cfe-commits
python3kgae created this revision. python3kgae added reviewers: pow2clk, beanz, bogner. Herald added subscribers: kosarev, Anastasia, mattd, gchakrabarti, asavonic, kerbowa, jvesely. Herald added a reviewer: aaron.ballman. Herald added a project: All. python3kgae requested review of this