[PATCH] D87282: [SYCL] Assume SYCL device functions are convergent

2020-09-08 Thread Alexey Bader via Phabricator via cfe-commits
bader created this revision. Herald added subscribers: cfe-commits, Anastasia, ebevhan, yaxunl. Herald added a project: clang. bader requested review of this revision. SYCL device compiler (similar to other SPMD compilers) assumes that functions are convergent by default to avoid invalid transform

[PATCH] D92782: [CodeGen][AMDGPU] Fix ICE for static initializer IR generation

2020-12-08 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 310145. bader added a comment. Fix clang-format issues. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92782/new/ https://reviews.llvm.org/D92782 Files: clang/lib/CodeGen/CGDecl.cpp clang/test/CodeGen/address

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2020-12-09 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In D89909#2439837 , @Anastasia wrote: > In D89909#2423750 , @bader wrote: > >>> It was mentioned that the changes in the type system with address spaces is >>> undesirable for SYCL because yo

[PATCH] D92782: [CodeGen][AMDGPU] Fix ICE for static initializer IR generation

2020-12-12 Thread Alexey Bader 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 rGa500a4358789: [CodeGen][AMDGPU] Fix ICE for static initializer IR generation (authored by bader). Repository: rG LLVM Github Monorepo CHANGES SIN

[PATCH] D93540: [clang] Use enum for LangOptions::SYCLVersion instead of unsigned

2020-12-19 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added subscribers: mdtoguchi, erichkeane. bader added a comment. This revision is now accepted and ready to land. LGTM. Thanks! @erichkeane, @mdtoguchi, we should upstream support for SYCL-2020 version in addition to SYCL-2017. Repository: rG LLVM Github M

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2020-11-11 Thread Alexey Bader via Phabricator via cfe-commits
bader added a subscriber: sdmitriev. bader added a comment. In D89909#2353931 , @Anastasia wrote: > In the RFC it has been discussed to either use target address spaces or > perhaps to introduce a new attribute to reflect a semantic needed for SYCL, > bu

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2020-11-13 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:4554 + + // Language rules define if it is legal to cast from one address space + // to another, and which address space we should use as a "common asavonic wrote: > sdmitriev wrote:

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2020-11-13 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 305165. bader added a comment. Remove support for `sycl_constant` address space attribute. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89909/new/ https://reviews.llvm.org/D89909 Files: clang/include/clang/Ba

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2020-11-13 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 305167. bader added a comment. Upload full patch after removing `sycl_constant` address space attribute support. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89909/new/ https://reviews.llvm.org/D89909 Files:

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2020-11-18 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: clang/lib/CodeGen/CGExpr.cpp:4554 + + // Language rules define if it is legal to cast from one address space + // to another, and which address space we should use as a "common asavonic wrote: > bader wrote: > >

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2020-11-18 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. > Did anyone conclude there that the language address spaces should be added > for SYCL? I can't see any of this. In fact I don't even think there was any > conclusion on the RFC. You should first make your design clear and agreed > before going ahead with the implementat

[PATCH] D87282: [SYCL] Assume SYCL device functions are convergent

2020-09-29 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 294931. bader added a comment. Applied Ronan's suggestion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87282/new/ https://reviews.llvm.org/D87282 Files: clang/lib/Frontend/CompilerInvocation.cpp clang/test

[PATCH] D87282: [SYCL] Assume SYCL device functions are convergent

2020-09-29 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. bader marked an inline comment as done. Closed by commit rG9263931fcccd: [SYCL] Assume SYCL device functions are convergent (authored by bader). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://rev

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2020-11-30 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. > I didn't sense any agreement or any sort of a conclusion on the RFC. > Moreover, I didn't feel at all that the existing address space attribute was > a good fit. I was suggesting to add a different attribute that isn't an > address space attribute from Embedded C. I don

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2020-12-03 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 309357. bader added a comment. Apply code review comment from @rjmccall Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89909/new/ https://reviews.llvm.org/D89909 Files: clang/include/clang/AST/Type.h clang/in

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2020-12-03 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:4596 + IRFuncTy->getParamType(FirstIRArg)); +} + bader wrote: > rjmccall wrote: > > This seems problematic; code like this shouldn't be neces

[PATCH] D92782: [CodeGen][AMDGPU] Fix ICE for static initializer IR generation

2020-12-07 Thread Alexey Bader via Phabricator via cfe-commits
bader created this revision. bader added reviewers: rjmccall, yaxunl. Herald added subscribers: ebevhan, t-tye, tpr, dstuttard, kzhuravl. bader requested review of this revision. Herald added subscribers: cfe-commits, wdng. Herald added a project: clang. Repository: rG LLVM Github Monorepo http

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2020-12-07 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: clang/lib/CodeGen/CGCall.cpp:4596 + IRFuncTy->getParamType(FirstIRArg)); +} + bader wrote: > bader wrote: > > rjmccall wrote: > > > This seems problematic; code like this

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2020-12-07 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 310003. bader added a comment. Move CodeGen crash fix to a separate review request: https://reviews.llvm.org/D92782 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89909/new/ https://reviews.llvm.org/D89909 Files

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2020-10-21 Thread Alexey Bader via Phabricator via cfe-commits
bader created this revision. bader added reviewers: Anastasia, keryell, Naghasan, asavonic, Fznamznon. Herald added subscribers: llvm-commits, cfe-commits, dexonsmith, kerbowa, ebevhan, hiraditya, yaxunl, nhaehnle, jvesely, jholewinski. Herald added projects: clang, LLVM. bader requested review of

[PATCH] D80932: [SYCL] Make default address space a superset of OpenCL address spaces.

2020-10-21 Thread Alexey Bader via Phabricator via cfe-commits
bader marked an inline comment as not done. bader added a comment. Alternative approach with SYCL specific semantic attributes - https://reviews.llvm.org/D89909. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80932/new/ https://reviews.llvm.org/D80

[PATCH] D100396: [SYCL] Enable `opencl_global_[host,device]` attributes for SYCL

2021-05-17 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 345806. bader marked an inline comment as done. bader added a comment. Added documentation to cover conversion rules and rebased on ToT. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D100396/new/ https://reviews.l

[PATCH] D100396: [SYCL] Enable `opencl_global_[host,device]` attributes for SYCL

2021-05-18 Thread Alexey Bader 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 rG2ab513cd3e06: [SYCL] Enable `opencl_global_[host,device]` attributes for SYCL (authored by bader). Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D102261: Introduce SYCL 2020 mode

2021-05-18 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. Sorry for the delay. LGTM. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D102261/new/ https://reviews.llvm.org/D102261 ___ cfe-commit

[PATCH] D28080: [Docs][OpenCL] Added OpenCL feature description to user manual.

2021-05-18 Thread Alexey Bader via Phabricator via cfe-commits
bader closed this revision. bader added a comment. Herald added subscribers: ebevhan, arphaman. Closed by https://reviews.llvm.org/rG18e165f50d8c1ab3afe7098dc00557d5f1a43cfa. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D28080/new/ https://reviews.llvm.org/D28080 __

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2021-01-27 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. Ping^2. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89909/new/ https://reviews.llvm.org/D89909 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2021-01-27 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 319566. bader added a comment. Rebase patch on ToT and applied small refactoring. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89909/new/ https://reviews.llvm.org/D89909 Files: clang/include/clang/AST/Type.h

[PATCH] D71016: [SYCL] Implement OpenCL kernel function generation

2021-01-27 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 319579. bader added a comment. Depends on D89909 Apply improvements developed in out-of-tree repository, which mostly are refactoring of SemaSYCL.cpp file. Rebase on ToT + D89909 (which only i

[PATCH] D71016: [SYCL] Implement OpenCL kernel function generation

2021-01-28 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 319909. bader added a comment. Addressed comment from Ronan in regression tests and synced them with the latest status. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71016/new/ https://reviews.llvm.org/D71016 F

[PATCH] D71016: [SYCL] Implement OpenCL kernel function generation

2021-01-28 Thread Alexey Bader via Phabricator via cfe-commits
bader commandeered this revision. bader edited reviewers, added: Fznamznon; removed: bader. bader added inline comments. Comment at: clang/test/CodeGenSYCL/device-functions.cpp:2 +// RUN: %clang_cc1 -triple spir64 -fsycl-is-device -S -emit-llvm %s -o - | FileCheck %s + +template

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2021-02-01 Thread Alexey Bader via Phabricator via cfe-commits
bader added a subscriber: aaron.ballman. bader added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:9996 + if (CGM.isTypeConstant(D->getType(), false)) { +if (auto ConstAS = CGM.getTarget().getConstantAddressSpace()) + return ConstAS.getValue(); -

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2021-02-01 Thread Alexey Bader via Phabricator via cfe-commits
bader added a subscriber: svenvh. bader added a comment. > Regarding SYCLDevice and SYCLAddrSpaceMap I am still not very convinced about > the flow. Have you had any design discussion regarding this already that you > could point to? We discussed this with you in https://github.com/intel/llvm/p

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2021-02-02 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 320741. bader added a comment. Applied code review suggestions from Anastasia. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89909/new/ https://reviews.llvm.org/D89909 Files: clang/include/clang/AST/Type.h c

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2021-02-02 Thread Alexey Bader via Phabricator via cfe-commits
bader marked an inline comment as done. bader added a comment. In D89909#2536157 , @Anastasia wrote: > In D89909#2534790 , @bader wrote: > >>> Regarding SYCLDevice and SYCLAddrSpaceMap I am still not very convinced

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2021-02-02 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 320761. bader added a comment. Fixed a couple of typos in the comments; NFC. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89909/new/ https://reviews.llvm.org/D89909 Files: clang/include/clang/AST/Type.h cla

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2021-02-03 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. > Anastasia added a comment. > In D89909#2536331 > https://reviews.llvm.org/D89909#2536331, @bader wrote: > >> In D89909#2536157 >> https://reviews.llvm.org/D89909#2536157, @Anastasia wrote

[PATCH] D108621: [HIPSPV] Add CUDA->SPIR-V address space mapping

2021-09-21 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: clang/lib/Basic/Targets/SPIR.h:59 +// translation). This mapping is enabled when the language mode is HIP. +1, // cuda_device +// cuda_constant pointer can be casted to default/"flat" pointer, but in Anastasia

[PATCH] D109818: [HIPSPV] Convert HIP kernels to SPIR-V kernels

2021-09-22 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:10224 +// pointers for HIPSPV. When the language mode is HIP, the SPIRTargetInfo +// maps cuda_device to SPIR-V's CrossWorkGroup address space. +llvm::Type *LTy = CGT.ConvertType(Ty); --

[PATCH] D110281: Change __builtin_sycl_unique_stable_name to just use an Itanium mangling

2021-09-23 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. LGTM, just one typo in addition to linter reports and I'd like John to take a look. Comment at: clang/docs/LanguageExtensions.rst:2524 mangling scheme at runtime. The mangler marks all the lambdas required to name -the SYCL kernel and emits a stable loc

[PATCH] D108621: [HIPSPV] Add CUDA->SPIR-V address space mapping

2021-10-05 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: clang/lib/Basic/Targets/SPIR.h:59 +// translation). This mapping is enabled when the language mode is HIP. +1, // cuda_device +// cuda_constant pointer can be casted to default/"flat" pointer, but in Anastasia

[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] D108621: [HIPSPV] Add CUDA->SPIR-V address space mapping

2021-10-05 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: clang/lib/Basic/Targets/SPIR.h:59 +// translation). This mapping is enabled when the language mode is HIP. +1, // cuda_device +// cuda_constant pointer can be casted to default/"flat" pointer, but in Anastasia

[PATCH] D96538: [SYCL] Ignore file-scope asm during device-side SYCL compilation.

2021-02-11 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. LGTM. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96538/new/ https://reviews.llvm.org/D96538 __

[PATCH] D108020: [NFC] Drop idle compiler option from the test.

2021-08-13 Thread Alexey Bader via Phabricator via cfe-commits
bader created this revision. bader added a reviewer: erichkeane. Herald added a subscriber: ebevhan. bader requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D108020 Files: cla

[PATCH] D108020: [NFC] Drop idle compiler option from the test.

2021-08-13 Thread Alexey Bader 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 rGd754b970eddb: [NFC] Drop idle compiler option from the test. (authored by bader). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D112404: [SPIR-V] Add translator tool

2021-10-28 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. This part looks good to me. Just a couple of minor style comments. Comment at: clang/lib/Driver/ToolChains/SPIRV.cpp:18 + +void SPIRV::constructTranslateCommand(Compilation &C,

[PATCH] D97573: [OpenMP] Handle non-function context before checking for diagnostic emission

2021-03-02 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97573/new/ https://reviews.llvm.org/D97573 ___ cf

[PATCH] D97717: [SYCL] Rework the SYCL driver options

2021-03-03 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. @aaron.ballman, it looks like unittests should be updated as well. Please, take a look at failures in pre-merge checks. Comment at: clang/include/clang/Basic/LangOptions.def:252 LANGOPT(SYCLIsDevice , 1, 0, "Generate code for SYCL device") +LANGOPT

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2021-03-04 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 328100. bader marked 4 inline comments as done. bader added a comment. Apply suggestions from Aaron. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89909/new/ https://reviews.llvm.org/D89909 Files: clang/includ

[PATCH] D89909: [SYCL] Implement SYCL address space attributes handling

2021-03-10 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In D89909#2606180 , @Anastasia wrote: > In D89909#2600859 , @aaron.ballman > wrote: > >> Just a few minor nits from me, but I'm mostly wondering: where are we at >> with this and are there s

[PATCH] D98411: [OpenCL] Respect calling convention for builtin

2021-03-11 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. Thanks! LGTM. I think we should consider deprecating `spir_func` calling convention in favor of default calling convention. I don't much value in having it today. Repository: rG LLVM Github M

[PATCH] D95624: [OpenCL][PR48896] Fix default address space in template argument deduction

2021-03-11 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: clang/test/SemaOpenCLCXX/address-space-templates.cl:60 + // Preserve the address space of the type in forwarding reference. + // CHECK: CXXMethodDecl {{.*}} operator() 'void (__private int &__private) const __generic' + foo4(i, [](auto

[PATCH] D112404: [SPIR-V] Add translator tool

2021-11-17 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG49682f14bf3f: [SPIR-V] Add translator tool (authored by linjamaki, committed by bader). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112404/new/ https://re

[PATCH] D107054: [Clang][CUDA] Add descriptors, mappings, and features for missing CUDA and PTX versions

2021-11-18 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. Herald added subscribers: carlosgalvezp, asavonic. @tra, ping. @steffenlarsen, does it make sense to add support for recently released 11.5 as well? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107054/new/ https://reviews.llvm.org/D107054 __

[PATCH] D114080: [SYCL] Diagnose uses of zero length arrays

2021-11-25 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. LGTM, with a couple of minor suggestions. Comment at: clang/lib/Sema/SemaSYCL.cpp:68-75 +bool ErrorFound = false; +if (isZeroSizedArray(*this, TypeToCheck)) { + SYCLDiagIfDeviceCode(UsedAt, diag::err_sycl_zero_array_size); + ErrorFound =

[PATCH] D109818: [HIPSPV] Convert HIP kernels to SPIR-V kernels

2021-12-03 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In D109818#3169531 , @linjamaki wrote: > The patch is ready to land. @Anastasia, @bader, could you commit this patch > to the LLVM for us? Thanks. Could you rebase on the tip of the main branch, please? I see a couple of conflict

[PATCH] D136160: [Attr][Doc] Fix pragma unroll documentation.

2022-10-18 Thread Alexey Bader via Phabricator via cfe-commits
bader created this revision. bader added a reviewer: aaron.ballman. Herald added a subscriber: ebevhan. Herald added a project: All. bader requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. There is a contradiction in the #pragma unroll behavi

[PATCH] D136160: [Attr][Doc] Fix pragma unroll documentation.

2022-10-18 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 468487. bader added a comment. Update commit message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136160/new/ https://reviews.llvm.org/D136160 Files: clang/include/clang/Basic/AttrDocs.td Index: clang/incl

[PATCH] D136160: [Attr][Doc] Fix pragma unroll documentation.

2022-10-19 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG66bd6074c133: [Attr][Doc] Fix pragma unroll documentation. (authored by bader). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136160/new/ https://reviews.ll

[PATCH] D141008: [Clang][SPIR-V] Emit target extension types for OpenCL types on SPIR-V.

2023-01-04 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. @jcranmer-intel, thanks a lot for working on this. I'm so excited to see these changes! Overall, it looks good to me, but I'd like to avoid some runtime computations if possible. Comment at: clang/lib/CodeGen/CGOpenCLRuntime.cpp:40 +static llvm::Type *g

[PATCH] D141008: [Clang][SPIR-V] Emit target extension types for OpenCL types on SPIR-V.

2023-01-04 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: clang/lib/CodeGen/CGOpenCLRuntime.cpp:40 +static llvm::Type *getSPIRVType(llvm::LLVMContext &Ctx, StringRef BaseType, +StringRef OpenCLName, StringRef ReadSuffix) { + SmallVector IntParams = {0, 0, 0, 0, 0,

[PATCH] D141375: [SYCL][OpenMP] Fix compilation errors for unsupported __bf16 intrinsics

2023-01-10 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. LGTM. I expect this to be a common issue for all single-source offloading programming models (i.e. CUDA and HIP in addition to SYCL and OpenMP offload). Probably we can generalize the code patt

[PATCH] D137154: Adding nvvm_reflect clang builtin

2022-11-10 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. Is binary size a concern here? NVIDIA, AMD and Intel GPUs are already have ~ 20 different architectures each, so I want my app/library to run on any GPU from these vendors (which is quite reasonable expectation), I'll need to have/distribute ~ 60 different binaries. libde

[PATCH] D142583: [SPIR-V] Add support for __arithmetic_fence builtin for SYCL targets.

2023-01-25 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. "[SPIR-V] Add support for __arithmetic_fence builtin for SYCL targets." -> "[SPIR] Add support for __arithmetic_fence builtin for SPIR target." Comment at: clang/test/CodeGen/arithmetic-fence-builtin.c:16 +// Test with fast math on spir target +// RUN: %

[PATCH] D142583: [SPIR] Add support for __arithmetic_fence builtin for SPIR target.

2023-01-26 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: clang/test/CodeGen/arithmetic-fence-builtin.c:73 int subit(float a, float b, float *fp) { - // CHECKFAST: define {{.*}}@subit(float noundef %a, float noundef %b{{.*}} + // CHECKPRECISE: define {{.*}}@subit(float noundef %a, float nounde

[PATCH] D142583: [SPIR] Add support for __arithmetic_fence builtin for SPIR target.

2023-01-26 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. LGTM. Thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142583/new/ https://reviews.llvm.org/D142583 ___ cfe-commits mailing list cfe-co

[PATCH] D142033: [OpenCL] Always add nounwind attribute for OpenCL

2023-01-18 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. Should we generalize and rename `clang/test/CodeGenOpenCL/convergent.cl` to validate function attributes other than `convergent`? It's not obvious that presence of `nounwind` attribute is valida

[PATCH] D127579: [clang][WIP] add option to keep types of ptr args for non-kernel functions in metadata

2022-06-15 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In D127579#3585516 , @beanz wrote: > @nikic the most important thing you need to know about SPIR-V is that it is a > virtual ISA based on LLVM IR. The ISA itself encodes types for pointers just > like LLVM IR would. And in additi

[PATCH] D127579: [clang][WIP] add option to keep types of ptr args for non-kernel functions in metadata

2022-06-16 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. > The way I understand a bitcast instruction in SPIR-V (`OpBitcast` in > https://www.khronos.org/registry/SPIR-V/specs/unified1/SPIRV.html#_conversion_instructions) > is that it can only apply to pointer types which are distinct from function > types. Note that I believe

[PATCH] D138284: Fix incorrect cast in VisitSYCLUniqueStableNameExpr

2022-11-18 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1635 + Context.getTargetInfo().getConstantAddressSpace().value_or( + LangAS::Default)); llvm::Constant *GlobalConstStr = Builder.CreateGlobalStringPtr( > This changes the

[PATCH] D138284: Fix incorrect cast in VisitSYCLUniqueStableNameExpr

2022-11-18 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1635 + Context.getTargetInfo().getConstantAddressSpace().value_or( + LangAS::Default)); llvm::Constant *GlobalConstStr = Builder.CreateGlobalStringPtr( arichardson wrote:

[PATCH] D138284: Fix incorrect cast in VisitSYCLUniqueStableNameExpr

2022-11-18 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. Thanks for the fix! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138284/new/ https://reviews.llvm.org/D138284 __

[PATCH] D76620: [SYCL] Implement __builtin_unique_stable_name.

2020-03-24 Thread Alexey Bader via Phabricator via cfe-commits
bader accepted this revision. bader added a comment. This revision is now accepted and ready to land. LGTM. Thanks! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76620/new/ https://reviews.llvm.org/D76620 ___ cfe-com

[PATCH] D72857: [SYCL] Driver option to enable SYCL mode and select SYCL version

2020-02-19 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 245373. bader marked 12 inline comments as done. bader added a comment. Rebase to ToT and address comments from Ronan. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72857/new/ https://reviews.llvm.org/D72857 Fil

[PATCH] D72857: [SYCL] Driver option to enable SYCL mode and select SYCL version

2020-02-19 Thread Alexey Bader via Phabricator via cfe-commits
bader marked an inline comment as done. bader added inline comments. Comment at: clang/include/clang/Driver/Options.td:3419 +def sycl_std_EQ : Joined<["-"], "sycl-std=">, Group, Flags<[CC1Option, NoArgumentUnused, CoreOption]>, + HelpText<"SYCL language standard to compile for.

[PATCH] D70172: [CUDA][HIP][OpenMP] Emit deferred diagnostics by a post-parsing AST travese

2020-02-20 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: clang/lib/Sema/Sema.cpp:1514 + void visitUsedDecl(SourceLocation Loc, Decl *D) { +if (auto *TD = dyn_cast(D)) { + for (auto *DD : TD->decls()) { yaxunl wrote: > rjmccall wrote: > > yaxunl wrote: > > > rjmccall wr

[PATCH] D72857: [SYCL] Driver option to enable SYCL mode and select SYCL version

2020-02-22 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 246072. bader added a comment. Rebase. Any other comments? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72857/new/ https://reviews.llvm.org/D72857 Files: clang/include/clang/Basic/LangOptions.def clang/inc

[PATCH] D72857: [SYCL] Driver option to enable SYCL mode and select SYCL version

2020-02-27 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In D72857#1895625 , @thakis wrote: > This landed here: > https://github.com/llvm/llvm-project/commit/bd97704eb5a95ecb048ce343c1a4be5d94e5 > > It broke tests on mac: http://45.33.8.238/mac/9011/step_7.txt > > Please take a look,

[PATCH] D72857: [SYCL] Driver option to enable SYCL mode and select SYCL version

2020-02-27 Thread Alexey Bader via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbd97704e: [SYCL] Driver option to select SYCL version (authored by Ruyk, committed by bader). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72857/new/ h

[PATCH] D72857: [SYCL] Driver option to enable SYCL mode and select SYCL version

2020-03-01 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In D72857#1895649 , @bader wrote: > In D72857#1895625 , @thakis wrote: > > > This landed here: > > https://github.com/llvm/llvm-project/commit/bd97704eb5a95ecb048ce343c1a4be5d94e5 > > > >

[PATCH] D60455: [SYCL] Implement SYCL device code outlining

2019-11-07 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. Hi @aaron.ballman, Thanks a lot for the comments and sorry for the long delay. We've been working on complete implementation of the SYCL 1.2.1 specification. Now I have more time to work on contributing the implementation to LLVM project. I re-based the patch and started

[PATCH] D60455: [SYCL] Implement SYCL device code outlining

2019-11-07 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 228286. bader added a comment. Applied comments from Aaron. Two comments left unresolved: - Split diagnostic message for sycl_kernel attribute into multiple messages. Will do tomorrow. - Change attribute "subject" in TableGen file from "Function" to "Functio

[PATCH] D60455: [SYCL] Implement SYCL device code outlining

2019-11-07 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: clang/include/clang/Basic/Attr.td:1034 + let Spellings = [Clang<"sycl_kernel">]; + let Subjects = SubjectList<[Function]>; + let LangOpts = [SYCL]; aaron.ballman wrote: > Shouldn't this be `FunctionTemplate` instead? @a

[PATCH] D60455: [SYCL] Implement SYCL device code outlining

2019-11-12 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 228868. bader added a subscriber: hfinkel. bader added a comment. Applied two remaining comments from Aaron. - Split diagnostics for `sycl_kernel` attribute to provide more informative message. - Moved attribute target check to TableGen file. I stole a workaro

[PATCH] D60455: [SYCL] Implement SYCL device code outlining

2019-11-12 Thread Alexey Bader via Phabricator via cfe-commits
bader marked an inline comment as done. bader added inline comments. Comment at: clang/test/SemaSYCL/device-attributes.cpp:35 +template +[[clang::sycl_kernel]] void foo1(); // expected-warning {{'sycl_kernel' attribute only applies to template funtions with special prototype, p

[PATCH] D60455: [SYCL] Implement SYCL device code outlining

2019-11-19 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. @aaron.ballman, @Anastasia, could you take a look at new version of the patch, please? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60455/new/ https://reviews.llvm.org/D60455 _

[PATCH] D60455: [SYCL] Implement SYCL device code outlining

2019-11-20 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 230281. bader marked 5 inline comments as done. bader added a comment. Applied code review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60455/new/ https://reviews.llvm.org/D60455 Files: clang/includ

[PATCH] D60455: [SYCL] Implement SYCL device code outlining

2019-11-20 Thread Alexey Bader via Phabricator via cfe-commits
bader added a subscriber: erichkeane. bader added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:10079-10080 +def warn_sycl_kernel_invalid_template_param_type : Warning< + "template parameter of template functions with 'sycl_kernel' attribute must"

[PATCH] D60455: [SYCL] Implement SYCL device code outlining

2019-11-20 Thread Alexey Bader via Phabricator via cfe-commits
bader marked an inline comment as done. bader added inline comments. Comment at: clang/test/Misc/pragma-attribute-supported-attributes-list.test:134 // CHECK-NEXT: ReturnsTwice (SubjectMatchRule_function) +// CHECK-NEXT: SYCLKernel (SubjectMatchRule_function) // CHECK-NEXT: Sco

[PATCH] D60455: [SYCL] Implement SYCL device code outlining

2019-11-20 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 230310. bader added a comment. Applied code review comments from Aaron. Allow template template parameters for function templates marked with `sycl_kernel` attribute. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D60455: [SYCL] Implement SYCL device code outlining

2019-11-20 Thread Alexey Bader via Phabricator via cfe-commits
bader marked 3 inline comments as done. bader added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:10079-10080 +def warn_sycl_kernel_invalid_template_param_type : Warning< + "template parameter of template functions with 'sycl_kernel' attribute mus

[PATCH] D60455: [SYCL] Implement SYCL device code outlining

2019-11-27 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60455/new/ https://reviews.llvm.org/D60455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[PATCH] D60455: [SYCL] Implement SYCL device code outlining

2019-11-27 Thread Alexey Bader via Phabricator via cfe-commits
bader marked an inline comment as done. bader added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2477 + if (LangOpts.SYCLIsDevice && Global->hasAttr()) { +// SYCL kernels can be templated and not called from anywhere in the ABataev wrot

[PATCH] D60455: [SYCL] Implement SYCL device code outlining

2019-11-27 Thread Alexey Bader via Phabricator via cfe-commits
bader marked an inline comment as done. bader added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2477 + if (LangOpts.SYCLIsDevice && Global->hasAttr()) { +// SYCL kernels can be templated and not called from anywhere in the ABataev wrot

[PATCH] D60455: [SYCL] Implement SYCL device code outlining

2019-11-28 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 231386. bader added a comment. Applied code review suggestions. - Split the patch into two parts. This patch contains only Sema part and LLVM IR generation part will be added separately. Updated commit message. - Replace `can't` with `cannot`. Repository:

[PATCH] D60455: [SYCL] Add sycl_kernel attribute for accelerated code outlining

2019-11-28 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 231396. bader added a comment. Fixed typo in the commit message: complier -> compiler. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60455/new/ https://reviews.llvm.org/D60455 Files: clang/include/clang/Basic/

[PATCH] D60455: [SYCL] Add sycl_kernel attribute for accelerated code outlining

2019-11-28 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In D60455#1762804 , @Anastasia wrote: > Sorry, I don't have capacity currently to review this and I don't want to be > blocking it either. @Anastasia, thanks for finding time for reviewing previous revisions of the patch. I reall

[PATCH] D60455: [SYCL] Add sycl_kernel attribute for accelerated code outlining

2019-11-29 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 231506. bader added a comment. Minor update adjusting to the recent changes. Updated comment "The 'sycl_kernel' attribute applies only to functions" -> "The 'sycl_kernel' attribute applies only to function templates". Renamed tests from "device-attributes*" to

[PATCH] D60455: [SYCL] Add sycl_kernel attribute for accelerated code outlining

2019-11-30 Thread Alexey Bader via Phabricator via cfe-commits
bader updated this revision to Diff 231595. bader marked 4 inline comments as done. bader added a comment. Applied comments from @Fznamznon. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D60455/new/ https://reviews.llvm.org/D60455 Files: clang/in

[PATCH] D60455: [SYCL] Add sycl_kernel attribute for accelerated code outlining

2019-12-02 Thread Alexey Bader via Phabricator via cfe-commits
bader marked 5 inline comments as done. bader added inline comments. Comment at: clang/test/SemaSYCL/kernel-attribute.cpp:4-5 + +__attribute((sycl_kernel)) void foo() { +} aaron.ballman wrote: > aaron.ballman wrote: > > Missing some tests: > > * test that both at

<    1   2   3   4   >