[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-11-08 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. FYI the original RFC is https://lists.llvm.org/pipermail/cfe-dev/2021-August/068603.html Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109144/new/ https://reviews.llvm.org/D109144 ___

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-11-08 Thread Anastasia Stulova via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGa10a69fe9c74: [SPIR-V] Add SPIR-V triple and clang target info. (authored by Anastasia). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-11-02 Thread Henry Linjamäki via Phabricator via cfe-commits
linjamaki added a comment. Is this patch ready to land on the LLVM? We do not have commit rights, so can you please commit this patch for us? Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109144/new/ https://reviews.llvm.org/D109144 _

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-10-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D109144#3066194 , @linjamaki wrote: >> Thanks for the clarifications. So it seems that you are not expecting that >> the device target triple is being explicitly passed anywhere then and that >> means you pass the device tr

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-10-24 Thread Henry Linjamäki via Phabricator via cfe-commits
linjamaki updated this revision to Diff 381847. linjamaki added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109144/new/ https://reviews.llvm.org/D109144 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/lib/Basic/

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-10-15 Thread Henry Linjamäki via Phabricator via cfe-commits
linjamaki added a subscriber: yaxunl. linjamaki added a comment. > Thanks for the clarifications. So it seems that you are not expecting that > the device target triple is being explicitly passed anywhere then and that > means you pass the device triple implicitly? We are meaning to use the `

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-10-14 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D109144#3063255 , @linjamaki wrote: >> Can you explain what does this mean > > It was trying to clarify a potential misunderstanding of how programs are > compiled when HIPSPV is targeted: For HIPSPV, the SPIR-V code genera

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-10-13 Thread Henry Linjamäki via Phabricator via cfe-commits
linjamaki added a comment. > Can you explain what does this mean It was trying to clarify a potential misunderstanding of how programs are compiled when HIPSPV is targeted: For HIPSPV, the SPIR-V code generation is done by the clang driver. When we compile HIP programs for HIPCL or the HIPLZ

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-10-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. I would like to explain the position of the OpenCL tooling community and the directions we would like to take with SPIR-V support in LLVM. We believe that SPIR-V triple and target should be added explicitly to LLVM/Clang for the following reasons: - It would be bette

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-10-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D109144#3050945 , @linjamaki wrote: >> What I have in mind is to continue using SPIR target for now (until SPIR-V >> back-end is added). > >> For instance, SYCL compiler emits code for SPIR target and code format is >> conf

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-10-08 Thread Henry Linjamäki via Phabricator via cfe-commits
linjamaki added a comment. > What I have in mind is to continue using SPIR target for now (until SPIR-V > back-end is added). > For instance, SYCL compiler emits code for SPIR target and code format is > configured via flag. > > `-emit-llvm` changes output file format for regular C++ compilatio

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-10-06 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D109144#3045883 , @bader wrote: > In D109144#3042247 , @Anastasia > wrote: > >> 1. Implementing SPIR-V target as SPIR target. @bader do you suggest that we >> add `spirv` triple to

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-10-06 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In D109144#3042247 , @Anastasia wrote: > 1. Implementing SPIR-V target as SPIR target. @bader do you suggest that we > add `spirv` triple to clang and map it into SPIR taget or do you suggest > something different? What I have i

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-10-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In D109144#3042014 , @bader wrote: > In D109144#3032865 , @Anastasia > wrote: > >> It would be good to get closure on this asap. >> >> @bader We had related discussions on the other rev

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-10-05 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In D109144#3032865 , @Anastasia wrote: > It would be good to get closure on this asap. > > @bader We had related discussions on the other reviews about the approach in > this patch. If you have any concerns/suggestions can you plea

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-09-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. It would be good to get closure on this asap. @bader We had related discussions on the other reviews about the approach in this patch. If you have any concerns/suggestions can you please notify asap... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-09-27 Thread Henry Linjamäki via Phabricator via cfe-commits
linjamaki updated this revision to Diff 375216. linjamaki added a comment. Rename SPIRABIInfo -> CommonSPIRABIInfo and SPIRTargetCodeGenInfo -> CommonSPIRTargetCodeGenInfo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109144/new/ https://reviews.l

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-09-16 Thread Henry Linjamäki via Phabricator via cfe-commits
linjamaki added a comment. Hi @Anastasia, could you submit this patch for me (I don’t have commit access)? Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109144/new/ https://reviews.llvm.org/D109144

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-09-13 Thread Henry Linjamäki via Phabricator via cfe-commits
linjamaki updated this revision to Diff 372406. linjamaki added a comment. Add -verify and expected-no-diagnostics to a SPIR-V test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109144/new/ https://reviews.llvm.org/D109144 Files: clang/include/

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-09-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks. Please, address suggested test simplifications in the final commit if applicable. I am also not sure if more types should be tested from the data layout... but my guess i

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-09-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/CodeGenOpenCL/spirv32_target.cl:12 +kernel void foo(global long *arg) { + int res1[sizeof(my_st) == 12 ? 1 : -1]; + int res2[sizeof(void *) == 4 ? 1 : -1]; linjamaki wrote: > Anastasia wrote: > > Are the

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-09-10 Thread Henry Linjamäki via Phabricator via cfe-commits
linjamaki updated this revision to Diff 371802. linjamaki marked 2 inline comments as done. linjamaki edited the summary of this revision. linjamaki added a comment. Merge two tests together. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109144/new/

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-09-10 Thread Henry Linjamäki via Phabricator via cfe-commits
linjamaki marked 2 inline comments as done. linjamaki added inline comments. Comment at: clang/lib/Basic/Targets.cpp:609 } + case llvm::Triple::spirv32: { +if (os != llvm::Triple::UnknownOS || Anastasia wrote: > I wonder how complete is the support of log

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-09-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/test/CodeGenOpenCL/spirv32_target.cl:12 +kernel void foo(global long *arg) { + int res1[sizeof(my_st) == 12 ? 1 : -1]; + int res2[sizeof(void *) == 4 ? 1 : -1]; Are these lines tested somehow? You could chang

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-09-03 Thread Henry Linjamäki via Phabricator via cfe-commits
linjamaki updated this revision to Diff 370541. linjamaki added a comment. Remove unused triple, reduce tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109144/new/ https://reviews.llvm.org/D109144 Files: clang/include/clang/Basic/DiagnosticG

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-09-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added subscribers: svenvh, bader. Anastasia added a comment. CC: @bader @svenvh Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109144/new/ https://reviews.llvm.org/D109144 ___ cfe-commits mailin

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-09-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Generally LGTM! I only have one suggestion regarding testing - I feel that it makes more sense to just omit the tests that are not specific to the target itself. This is mainly because SPIR-V is now inherited from SPIR so the same logic applies in most of places. I t

[PATCH] D109144: [SPIR-V] Add SPIR-V triple architecture and clang target info

2021-09-02 Thread Henry Linjamäki via Phabricator via cfe-commits
linjamaki created this revision. Herald added subscribers: Naghasan, dexonsmith, wenlei, Anastasia, arphaman, hiraditya. linjamaki requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Add new architectures ‘spirv32’, ‘spirv64’