[PATCH] D110742: [OpenCL] Add pure attributes to vload builtins

2021-12-16 Thread Stuart Brady 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 rGceb80557e523: [OpenCL] Add pure attribute to vload builtins (authored by stuart). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D110742: [OpenCL] Add pure attributes to vload builtins

2021-12-16 Thread Stuart Brady via Phabricator via cfe-commits
stuart updated this revision to Diff 394878. stuart added a comment. I've updated the review to include test changes that are required for check-clang-semaopencl to pass. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110742/new/ https://reviews.llvm.org/D110742 Files: clang/lib/Head

[PATCH] D110742: [OpenCL] Add pure attributes to vload builtins

2021-12-16 Thread Stuart Brady 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 rG1a376bc28535: [OpenCL] Add pure attribute to vload builtins (authored by stuart). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D110742: [OpenCL] Add pure attributes to vload builtins

2021-12-16 Thread Stuart Brady via Phabricator via cfe-commits
stuart added a comment. In D110742#3194608 , @svenvh wrote: > Apologies for the late reply... I'd prefer to get the langref updated first, > for the sake of consistency and to ensure other stakeholders agree with the > interpretation. You can still go

[PATCH] D110742: [OpenCL] Add pure attributes to vload builtins

2021-12-15 Thread Stuart Brady via Phabricator via cfe-commits
stuart updated this revision to Diff 394580. stuart retitled this revision from "[OpenCL] Add pure and const attributes to vload builtins" to "[OpenCL] Add pure attributes to vload builtins". stuart edited the summary of this revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D110742: [OpenCL] Add pure and const attributes to vload builtins

2021-10-08 Thread Stuart Brady via Phabricator via cfe-commits
stuart added a comment. In D110742#3048301 , @svenvh wrote: >> For the constant address space, the const attribute (or readnone) can be >> used. As memory in the constant address space is immutable, the statement in >> the langref that: "if a readnone f

[PATCH] D110742: [OpenCL] Add pure and const attributes to vload builtins

2021-09-29 Thread Stuart Brady via Phabricator via cfe-commits
stuart created this revision. stuart added reviewers: svenvh, Anastasia, airlied, yaxunl. Herald added a subscriber: ldrumm. stuart requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Use the `pure` and `const` attributes for the `vload`, `vloa

[PATCH] D110636: [OpenCL][NFC] Refactor vloada_half and vstorea_half decls

2021-09-29 Thread Stuart Brady 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 rG26db178cc2b3: [OpenCL][NFC] Refactor vloada_half and vstorea_half decls (authored by stuart). Repository: rG LLVM Github Monorepo CHANGES SINCE L

[PATCH] D110636: [OpenCL][NFC] Refactor vloada_half and vstorea_half decls

2021-09-28 Thread Stuart Brady via Phabricator via cfe-commits
stuart created this revision. stuart added reviewers: svenvh, Anastasia, airlied, yaxunl. Herald added a subscriber: ldrumm. stuart requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Group them together with the vload_half and vstore_half decl

[PATCH] D108761: [OpenCL] Remove decls for scalar vloada_half and vstorea_half* fns

2021-09-02 Thread Stuart Brady via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG32955be6bf7d: [OpenCL] Remove decls for scalar vloada_half and vstorea_half* fns (authored by stuart). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108761/n

[PATCH] D104858: [OpenCL][ARM] Fix ICE when compiling a kernel

2021-08-26 Thread Stuart Brady via Phabricator via cfe-commits
stuart added a comment. > Unfortunately I cannot look at this in detail right now, but I'll reply > quickly for a heads up: The problem was not how to detect kernels, but the > ABI/CC mismatch to the > clSetKerneArg() with (user facing) arguments that get split to multiple args > or vice versa.

[PATCH] D108761: [OpenCL] Remove decls for scalar vloada_half and vstorea_half* fns

2021-08-26 Thread Stuart Brady via Phabricator via cfe-commits
stuart created this revision. stuart added reviewers: svenvh, Anastasia, airlied, yaxunl. Herald added a subscriber: ldrumm. stuart requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. These functions are not part of the OpenCL C specification.

[PATCH] D106434: [OpenCL] Add cl_khr_integer_dot_product

2021-07-22 Thread Stuart Brady via Phabricator via cfe-commits
stuart accepted this revision. stuart added a comment. LGTM, too. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106434/new/ https://reviews.llvm.org/D106434 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D104118: [OpenCL] Use DW_LANG_OpenCL language tag for OpenCL C

2021-06-25 Thread Stuart Brady via Phabricator via cfe-commits
stuart added a comment. On reflection, I don't think it makes sense to make use of DW_LANG_C_plus_plus_17 or DW_LANG_C_plus_plus_20 in Clang just yet, as these are generally not supported by other tooling. I am a bit confused by DWARF publishing these tags ahead of time, yet tooling having not

[PATCH] D104118: [OpenCL] Use DW_LANG_OpenCL language tag for OpenCL C

2021-06-25 Thread Stuart Brady via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe47027d091de: [OpenCL] Use DW_LANG_OpenCL language tag for OpenCL C (authored by stuart). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104118/new/ https://

[PATCH] D104118: [OpenCL] Use DW_LANG_OpenCL language tag for OpenCL C

2021-06-23 Thread Stuart Brady via Phabricator via cfe-commits
stuart updated this revision to Diff 353988. stuart added a comment. Added handling of `-gstrict-dwarf` and updated tests accordingly. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104118/new/ https://reviews.llvm.org/D104118 Files: clang/lib/Co

[PATCH] D104291: [Debug-Info] strict dwarf for DW_LANG_C_plus_plus_14

2021-06-16 Thread Stuart Brady via Phabricator via cfe-commits
stuart added a comment. > There is no `CPlusPlus03` in `LangOptions`, so it is better not to merge > `DW_LANG_C_plus_plus_03` support with D99250 > . Oh - I see, `c++03` is defined in LangStandards.def an alias for `c++98`, as the former essentially consists of

[PATCH] D104118: [OpenCL] Use DW_LANG_OpenCL language tag for OpenCL C

2021-06-15 Thread Stuart Brady via Phabricator via cfe-commits
stuart planned changes to this revision. stuart added a comment. Changes will be required to align this with D104291 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104118/new/ https://reviews.llvm.org/D104118 __

[PATCH] D104291: [Debug-Info] strict dwarf for DW_LANG_C_plus_plus_14

2021-06-15 Thread Stuart Brady via Phabricator via cfe-commits
stuart added a comment. This looks good to me. @jzzheng22 informs me there was a comment in D99250 to the effect that DW_LANG_C_plus_plus_03 is not emitted, at all - it too was introduced in DWARF 5. I wonder if this should be addressed in a separate commit?

[PATCH] D104118: [OpenCL] Use DW_LANG_OpenCL language tag for OpenCL C

2021-06-15 Thread Stuart Brady via Phabricator via cfe-commits
stuart marked an inline comment as done. stuart added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:579 LangTag = llvm::dwarf::DW_LANG_ObjC; + } else if (LO.OpenCL && CGM.getCodeGenOpts().DwarfVersion >= 5) { +LangTag = llvm::dwarf::DW_LANG_OpenCL;

[PATCH] D104118: [OpenCL] Use DW_LANG_OpenCL language tag for OpenCL C

2021-06-15 Thread Stuart Brady via Phabricator via cfe-commits
stuart added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:579 LangTag = llvm::dwarf::DW_LANG_ObjC; + } else if (LO.OpenCL && CGM.getCodeGenOpts().DwarfVersion >= 5) { +LangTag = llvm::dwarf::DW_LANG_OpenCL; shchenz wrote: > I think for

[PATCH] D104118: [OpenCL] Use DW_LANG_OpenCL language tag for OpenCL C

2021-06-11 Thread Stuart Brady via Phabricator via cfe-commits
stuart updated this revision to Diff 351454. stuart added a comment. Add missing trailing commas to CHECK lines of FileCheck test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104118/new/ https://reviews.llvm.org/D104118 Files: clang/lib/CodeGe

[PATCH] D104118: [OpenCL] Use DW_LANG_OpenCL language tag for OpenCL C

2021-06-11 Thread Stuart Brady via Phabricator via cfe-commits
stuart added a comment. Note: there is currently no DWARF language code defined for //C++ for OpenCL//, so we must use DW_LANG_C_plus_plus* if we wish to be able to determine whether output has been generated from //C++ for OpenCL// source or from //OpenCL C// source. I have raised DWARF issue

[PATCH] D104118: [OpenCL] Use DW_LANG_OpenCL language tag for OpenCL C

2021-06-11 Thread Stuart Brady via Phabricator via cfe-commits
stuart created this revision. stuart added reviewers: Anastasia, keith.walker.arm, svenvh, aprantl, SouraVX, shchenz, jzzheng22. Herald added subscribers: ldrumm, yaxunl. stuart requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository:

[PATCH] D97725: [OpenCL] Add const attribute to ctz() builtin

2021-06-07 Thread Stuart Brady 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 rG9b14670f3ca2: [OpenCL] Add const attribute to ctz() builtins (authored by stuart). Herald added subscribers: cfe-commits, ldrumm. Changed prior to c

[PATCH] D103097: Add DWARF address spaces mapping for SPIR

2021-06-04 Thread Stuart Brady via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG333987b04589: [OpenCL] Add DWARF address spaces mapping for SPIR (authored by jzzheng22, committed by stuart). Changed prior to commit: https://reviews.llvm.org/D103097?vs=348910&id=349910#toc Reposito

[PATCH] D103097: Add DWARF address spaces mapping for SPIR

2021-06-04 Thread Stuart Brady via Phabricator via cfe-commits
stuart added inline comments. Comment at: clang/test/CodeGenOpenCL/spir-debug-info-pointer-address-space.cl:22 +// CHECK-DAG: distinct !DIGlobalVariable(name: "FileVar5", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, line: {{[0-9]+}}, type: ![[DWARF_ADDRESS_SPACE_GLOBAL]], isLocal: fa

[PATCH] D98418: [OpenCL] Remove mixed signedness atomic_fetch_ from opencl-c.h

2021-03-11 Thread Stuart Brady via Phabricator via cfe-commits
stuart accepted this revision. stuart added a comment. This revision is now accepted and ready to land. Looks good to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98418/new/ https://reviews.llvm.org/D98418

[PATCH] D96161: [OpenCL] Fix printing of types with signed prefix in arg info metadata

2021-02-09 Thread Stuart Brady via Phabricator via cfe-commits
stuart requested changes to this revision. stuart added a comment. This revision now requires changes to proceed. Looks good, just some suggestions about the test. Comment at: clang/test/CodeGenOpenCL/kernel-arg-info.cl:110 +kernel void foo9(signed char si1, global const sig

[PATCH] D96161: [OpenCL] Fix printing of types with signed prefix in arg info metadata

2021-02-05 Thread Stuart Brady via Phabricator via cfe-commits
stuart requested changes to this revision. stuart added a comment. This revision now requires changes to proceed. Looks good. Small nit about the test case. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1500 StringRef typeNameRef = typeName; // Turn "unsign

[PATCH] D96151: [OpenCL] Fix pipe type printing in arg info metadata

2021-02-05 Thread Stuart Brady via Phabricator via cfe-commits
stuart added a comment. This looks like a really good cleanup, in addition to fixing the metadata for pipes. Minor nit: "matadata" -> "metadata" in the description, and there's a StringRef construction that could be sunk. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:1496-

[PATCH] D46015: [OpenCL] Add separate read_only and write_only pipe IR types

2018-04-25 Thread Stuart Brady via Phabricator via cfe-commits
stuart added a comment. In https://reviews.llvm.org/D46015#1078260, @AlexeySotkin wrote: > In https://reviews.llvm.org/D46015#1078235, @stuart wrote: > > > In https://reviews.llvm.org/D46015#1078217, @AlexeySotkin wrote: > > > > > There should not be need for bitcast. Could give an example ? Than

[PATCH] D46015: [OpenCL] Add separate read_only and write_only pipe IR types

2018-04-25 Thread Stuart Brady via Phabricator via cfe-commits
stuart added a comment. In https://reviews.llvm.org/D46015#1078217, @AlexeySotkin wrote: > There should not be need for bitcast. Could give an example ? Thanks. If I have a `write_only` pipe as the argument to `get_pipe_max_packets()`, and this uses a single `__get_pipe_num_packets()` function

[PATCH] D46015: [OpenCL] Add separate read_only and write_only pipe IR types

2018-04-25 Thread Stuart Brady via Phabricator via cfe-commits
stuart added a comment. In https://reviews.llvm.org/D46015#1077401, @AlexeySotkin wrote: > It is not clear why we need two versions of get_pipe_num_packets and > get_pipe_max_packets builtins. There is only one instruction per builtin in > the SPIR-V spec. I think splitting the IR type is enoug

[PATCH] D46015: [OpenCL] Add separate read_only and write_only pipe IR types

2018-04-25 Thread Stuart Brady via Phabricator via cfe-commits
stuart updated this revision to Diff 143938. stuart edited the summary of this revision. stuart added a comment. Changed new getPipeType() method to have protected visibility. Updated summary to explain the need for the extra builtin implementation functions. https://reviews.llvm.org/D46015 F

[PATCH] D46015: [OpenCL] Add separate read_only and write_only pipe IR types

2018-04-24 Thread Stuart Brady via Phabricator via cfe-commits
stuart created this revision. stuart added reviewers: Anastasia, yaxunl. Herald added a subscriber: cfe-commits. SPIR-V encodes the read_only and write_only access qualifiers of pipes, so separate LLVM IR types are required to target SPIR-V. Other backends may also find this useful. These new ty