[PATCH] D28814: [OpenCL] Add missing address spaces in IR generation of Blocks

2017-02-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia closed this revision. Anastasia marked an inline comment as done. Anastasia added a comment. Committed in r 293286 https://reviews.llvm.org/D28814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29038: [OpenCL] Accept logical NOT for pointer types in CL1.1

2017-02-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/logical-ops.cl:1-3 +// RUN: %clang_cc1 %s -verify -cl-std=CL1.1 -triple x86_64-unknown-linux-gnu +// RUN: %clang_cc1 %s -verify -cl-std=CL1.2 -triple x86_64-unknown-linux-gnu + arsenm wrote: >

[PATCH] D29038: [OpenCL] Accept logical NOT for pointer types in CL1.1

2017-02-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia closed this revision. Anastasia added a comment. Committed in r294313 https://reviews.llvm.org/D29038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29038: [OpenCL] Accept logical NOT for pointer types in CL1.1

2017-02-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. @arsenm, do you think you could complete the review? https://reviews.llvm.org/D29038 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29038: [OpenCL] Accept logical NOT for pointer types in CL1.1

2017-01-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 85890. Anastasia marked an inline comment as done. Anastasia retitled this revision from "[OpenCL] Accept logical NOT for pointer types in CL1.0 and CL1.1" to "[OpenCL] Accept logical NOT for pointer types in CL1.1". https://reviews.llvm.org/D29038

[PATCH] D29038: [OpenCL] Accept logical NOT for pointer types in CL1.1

2017-01-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/logical-ops.cl:1-3 +// RUN: %clang_cc1 %s -verify -cl-std=CL1.1 -triple x86_64-unknown-linux-gnu +// RUN: %clang_cc1 %s -verify -cl-std=CL1.2 -triple x86_64-unknown-linux-gnu + Anastasia wrote: >

[PATCH] D29038: [OpenCL] Accept logical NOT for pointer types in CL1.0 and CL1.1

2017-01-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 2 inline comments as done. Anastasia added inline comments. Comment at: test/SemaOpenCL/logical-ops.cl:1-3 +// RUN: %clang_cc1 %s -verify -cl-std=CL1.1 -triple x86_64-unknown-linux-gnu +// RUN: %clang_cc1 %s -verify -cl-std=CL1.2 -triple x86_64-unknown-linux-gnu

[PATCH] D29038: [OpenCL] Accept logical NOT for pointer types in CL1.0 and CL1.1

2017-01-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 85878. Anastasia edited reviewers, added: arsenm; removed: pekka.jaaskelainen. Anastasia removed a subscriber: arsenm. Anastasia added a comment. Herald added a subscriber: wdng. Added other CL versions to testing (from comment by Matt)!

[PATCH] D28814: [OpenCL] Add missing address spaces in IR generation of Blocks

2017-01-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 85888. Anastasia added a comment. Updated NULL ptr generation and added separate CodeGen test for checking amended Block generation behaviour in OpenCL! https://reviews.llvm.org/D28814 Files: lib/AST/Expr.cpp lib/CodeGen/CGBlocks.cpp

[PATCH] D28814: [OpenCL] Add missing address spaces in IR generation of Blocks

2017-01-26 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 2 inline comments as done. Anastasia added inline comments. Comment at: test/CodeGenOpenCL/cl20-device-side-enqueue.cl:3 // RUN: %clang_cc1 %s -cl-std=CL2.0 -ffake-address-space-map -O0 -emit-llvm -o - -triple "spir64-unknown-unknown" | FileCheck %s

[PATCH] D28860: [OpenCL] Diagnose write_only image3d when extension is disabled

2017-01-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia closed this revision. Anastasia added a comment. Committed in r293050! https://reviews.llvm.org/D28860 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28814: [OpenCL] Add missing address spaces in IR generation of Blocks

2017-01-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGBlocks.cpp:723 +? CGM.getNSConcreteStackBlock() +: llvm::Constant::getNullValue( + CGM.getNSConcreteStackBlock()->getType());

[PATCH] D29830: [OpenCL][Doc] Relase 4.0 notes for OpenCL

2017-02-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. https://reviews.llvm.org/D29830 Files: docs/ReleaseNotes.rst Index: docs/ReleaseNotes.rst === --- docs/ReleaseNotes.rst +++ docs/ReleaseNotes.rst @@ -17,7 +17,7 @@ Introduction

[PATCH] D29829: [OpenCL][Doc] Description for adding OpenCL vendor extension in user manual

2017-02-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Adding a description of a new feature that allows to specify vendor extension in flexible way using compiler pragma instead of modifying source code directly. Feature committed in Clang@r289979. https://reviews.llvm.org/D29829 Files: docs/UsersManual.rst

[PATCH] D29764: [OpenCL] Blocks cannot capture/reference another block

2017-02-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D29764#673679, @yaxunl wrote: > In https://reviews.llvm.org/D29764#673548, @Nicola wrote: > > > Looking at "Example 4" in the standard it looks like this should also be > > illegal. > > > > int (^block1)(void) = ^int {return 1;}; > >

[PATCH] D29764: [OpenCL] Blocks cannot capture/reference another block

2017-02-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Herald added a subscriber: yaxunl. Adding the last restriction from s6.12.5 OpenCL C v2.0. "A Block cannot reference or capture another Block variable declared in the outer scope". https://reviews.llvm.org/D29764 Files:

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

2017-02-09 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. @Pekka, do you think there is something more to be done here or can I close this revision now? Apparently, I won't be able to pass` -target` in all cases because `-cc` has to be always the first parameter. Also I am preparing additional text and some minor

[PATCH] D28058: [OpenCL] Correct ndrange_t implementation

2017-02-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia closed this revision. Anastasia added a comment. Committed in 295311 https://reviews.llvm.org/D28058 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29830: [OpenCL][Doc] Relase 4.0 notes for OpenCL

2017-02-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia closed this revision. Anastasia added a comment. Committed to release40@295315 https://reviews.llvm.org/D29830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29764: [OpenCL] Blocks cannot capture/reference another block

2017-02-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia closed this revision. Anastasia added a comment. Committed in r295307! https://reviews.llvm.org/D29764 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29829: [OpenCL][Doc] Description for adding OpenCL vendor extension in user manual

2017-02-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia closed this revision. Anastasia added a comment. Committed in 295313! https://reviews.llvm.org/D29829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2017-01-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > (I should pass -finclude-default-header after -cc1 without -Xclang then it > works, but I think also the > latter version should work, no?) In general -cc1 and -Xclang have similar effect so I either should work indeed. > Also, I cannot add -S (even with

[PATCH] D29038: [OpenCL] Accept logical NOT for pointer types in CL1.0 and CL1.1

2017-01-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Herald added a subscriber: yaxunl. A bug is reported regarding incorrect error given for logical NOT operation with a pointer type: https://llvm.org/bugs/show_bug.cgi?id=30217 Detailed investigation shows that this has only been a problem for CL earlier than

[PATCH] D29038: [OpenCL] Accept logical NOT for pointer types in CL1.0 and CL1.1

2017-01-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 85418. Anastasia added a comment. Added missing test! https://reviews.llvm.org/D29038 Files: lib/Sema/SemaExpr.cpp test/SemaOpenCL/invalid-logical-ops-1.1.cl test/SemaOpenCL/invalid-logical-ops-1.2.cl test/SemaOpenCL/logical-ops.cl Index:

[PATCH] D28814: [OpenCL] Add missing address spaces in IR generation of Blocks

2017-01-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Ping! @yaxunl, Sam do you think you will have time to look into this? https://reviews.llvm.org/D28814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D28814: [OpenCL] Add missing address spaces in IR generation of Blocks

2017-01-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. ObjC IR generation for Blocks currently: I. Generates local to block variable declaration block literal in case it contains captures. II. Global variable block literal in case it doesn't have any captures. The address spaces are missing however if we use this

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

2017-01-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: docs/UsersManual.rst:2065 + + $ clang -cc1 -triple spir64-unknown-unknown -cl-ext=-cl_khr_fp64 test.cl + pekka.jaaskelainen wrote: > Is this correct? I cannot make it work: > > ``` >

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

2017-01-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. @pekka.jaaskelainen, I just compiled the release 4.0 branch and it all works for me as expected: clang -cc1 -triple spir64-unknown-unknown test.cl clang -target spir64-unknown-unknown test.cl https://reviews.llvm.org/D28080

[PATCH] D27099: [OpenCL] Prohibit using reserve_id_t in program scope.

2016-11-25 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaDecl.cpp:5924 - DeclContext *OriginalDC = DC; - bool IsLocalExternDecl = SC == SC_Extern && - adjustContextForLocalExternDecl(DC); +// OpenCL 1.2 spec, p6.9 r: +// The event type

[PATCH] D27109: [OpenCL] Prevent generation of globals in non-constant address space for OpenCL

2016-11-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 79403. Anastasia added a comment. Merged if statements into one! https://reviews.llvm.org/D27109 Files: lib/CodeGen/CGDecl.cpp test/CodeGenOpenCL/constant-addr-space-globals.cl Index: test/CodeGenOpenCL/constant-addr-space-globals.cl

[PATCH] D27099: [OpenCL] Prohibit using reserve_id_t in program scope.

2016-11-28 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 the small nitpick before committing. Comment at: lib/Sema/SemaDecl.cpp:5965 + +// OpenCL 1.2 spec, p6.9 r: +// The event type

[PATCH] D27453: [OpenCL] Enable unroll hint for OpenCL 1.x.

2016-12-09 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! https://reviews.llvm.org/D27453 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D27569: [OpenCL] Enabling the usage of CLK_NULL_QUEUE as compare operand.

2016-12-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/queue_t_overload.cl:10 + foo(0, src2); + foo(q, src3); // expected-error {{call to 'foo' is ambiguous}} +} could we also add something non-convertible for queue i.e. foo(1, src3);

[PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-12-16 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! Small nitpicks below can be done before committing. Also it would be nice to double check the compile time is still fine after the last rebase. Thanks! Comment

[PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-12-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Sema/Sema.h:8081 + /// \brief Set current OpenCL extensions for a type which can only be used + /// when these OpenCL extensions are enabled. If current OpenCL Extsion is + /// empty, do nothing.

[PATCH] D27453: [OpenCL] Enable unroll hint for OpenCL 1.x.

2016-12-06 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaStmtAttr.cpp:232 - if (S.getLangOpts().OpenCLVersion < 200) { -S.Diag(A.getLoc(), diag::err_attribute_requires_opencl_version) The comment above refers to v2.0, could we update it reflecting the

[PATCH] D27569: [OpenCL] Enabling the usage of CLK_NULL_QUEUE as compare operand.

2016-12-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaExpr.cpp:9624 + if (getLangOpts().OpenCL && getLangOpts().OpenCLVersion >= 200) { +if (LHSIsNull && RHSType->isQueueT()) { getLangOpts().OpenCL is redundant because getLangOpts().OpenCLVersion is

[PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-12-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8127 "invalid prototype, variadic arguments are not allowed in OpenCL">; +def err_requires_extension : Error< + "use of %select{declaration|type }0%1 requires %2 extension to be

[PATCH] D27671: [OpenCL] Improve address space diagnostics.

2016-12-12 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! https://reviews.llvm.org/D27671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2017-01-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D28080#644222, @yaxunl wrote: > > @yaxunl Sam, I think it would be nice to describe your recent change for > > adding OpenCL extensions. Would you like to write up some text? Otherwise I > > can draft something and you can review. :) > >

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

2017-01-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 83824. Anastasia added a comment. Updated with comments from Mats! https://reviews.llvm.org/D28080 Files: docs/UsersManual.rst www/index.html Index: www/index.html === ---

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

2017-01-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 83962. Anastasia added a comment. Addressed comments from Alexey, Pekka, and Sam! https://reviews.llvm.org/D28080 Files: docs/UsersManual.rst www/index.html Index: www/index.html ===

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

2017-01-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 16 inline comments as done. Anastasia added inline comments. Comment at: docs/UsersManual.rst:2013 +to perform machine code generation. + +Clang currently supports OpenCL standards up to v2.0. pekka.jaaskelainen wrote: > I'd like to add a

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

2017-01-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia marked 4 inline comments as done. Anastasia added a comment. Ping! Any more comments here? It would be nice to commit this before the 4.0 rel branch is taken (on Jan 12). https://reviews.llvm.org/D28080 ___ cfe-commits mailing list

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

2017-01-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 84136. Anastasia added a comment. Update based on comments from Pekka. https://reviews.llvm.org/D28080 Files: docs/UsersManual.rst www/index.html Index: docs/UsersManual.rst === ---

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

2017-01-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: docs/UsersManual.rst:2130 + +- x86 is used by some implementations that are x86 compatible + (e.g. `POCL `_) and currently remains for backwards pekka.jaaskelainen wrote: > Anastasia wrote: >

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

2017-01-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Since everyone agreed on the core part of this documentation I have committed the current revision in 291780 to make it easier for the release. Feel free to give me more feedback (if any) as small changes can still be merged in. @yaxunl Sam, I think it would be

[PATCH] D27109: [OpenCL] Prevent generation of globals in non-constant address space for OpenCL

2016-11-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia closed this revision. Anastasia added a comment. Committed in r288163. https://reviews.llvm.org/D27109 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27334: [OpenCL] Ambiguous function call.

2016-12-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D27334#612858, @bader wrote: > In https://reviews.llvm.org/D27334#611703, @Anastasia wrote: > > > This change seems to modify normal C behavior again. Is there any strong > > motivation for doing this and if yes could it be done generically

[PATCH] D27300: [OpenCL] Fix SPIR version generation.

2016-12-05 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! https://reviews.llvm.org/D27300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D27403: [OpenCL] Added a LIT test for ensuring address space mangling is done the same both in OpenCL1.2 and OpenCL2.0.

2016-12-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/CodeGenOpenCL/address-spaces-mangling.cl:36 + +__attribute__((overloadable)) void foo(private char *); +__attribute__((overloadable)) void foo(global char *); Just trying to understand what we are missing in the

[PATCH] D27334: [OpenCL] Ambiguous function call.

2016-12-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. This change seems to modify normal C behavior again. Is there any strong motivation for doing this and if yes could it be done generically with C? Comment at: lib/Sema/SemaChecking.cpp:2479 +// integer values. +if (FDecl->hasAttr())

[PATCH] D27300: [OpenCL] Fix SPIR version generation.

2016-12-02 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/CodeGenOpenCL/spir_version.cl:22 + // CHECK-SPIR-CL20: !opencl.spir.version = !{[[SPIR:![0-9]+]]} // CHECK-SPIR-CL20: !opencl.ocl.version = !{[[SPIR:![0-9]+]]} Could we then use VER here too?

[PATCH] D28257: [OpenCL] Re-enable supported core extensions based on opencl version when disabling all extensions using pragma

2017-01-05 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. Ok, LGTM! Thanks! https://reviews.llvm.org/D28257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D28257: [OpenCL] Re-enable supported core extensions based on opencl version when disabling all extensions using pragma

2017-01-04 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/extensions.cl:47 +#ifndef _OPENCL_H_ int isnan(float x) { Why do you need this? https://reviews.llvm.org/D28257 ___ cfe-commits mailing list

[PATCH] D28136: [OpenCL] Implement as_type operator as alias of __builtin_astype.

2017-01-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. This has been discussed during the initial review for the header: http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160425/157187.html The main issue is after preprocessing the header the original function name is no longer available in diagnostics reported.

[PATCH] D28048: [OpenCL] Align fake address space map with the SPIR target maps.

2016-12-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. Excellent! Thanks! https://reviews.llvm.org/D28048 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-12-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Anastasia added reviewers: yaxunl, pekka.jaaskelainen, bader. Anastasia added subscribers: cfe-commits, rsmith. Adding information on OpenCL to Clang documentation. This currently contain the main features only. I am hoping we can improve it with time documenting

[PATCH] D28058: [OpenCL] Correct ndrange_t implementation

2016-12-23 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:2491 +llvm::Value *Range = NDRangeL.getAddress().getPointer(); +llvm::Type *RangeTy = NDRangeL.getAddress().getType(); I think following standard Clang CodeGen convention we should

[PATCH] D27981: Fix problems in "[OpenCL] Enabling the usage of CLK_NULL_QUEUE as compare operand."

2016-12-22 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! If you checked there are no warnings any more, it seems fine to commit! :) https://reviews.llvm.org/D27981 ___ cfe-commits mailing

[PATCH] D28048: [OpenCL] Align fake address space map with the SPIR target maps.

2016-12-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a subscriber: pekka.jaaskelainen. Anastasia added a comment. I believe it's not that important what those numbers actually are, but having the consistency with SPIR might be better indeed at least even for documentation purposes! @pekka.jaaskelainen, I think you are using x86

[PATCH] D27569: [OpenCL] Enabling the usage of CLK_NULL_QUEUE as compare operand.

2016-12-19 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! https://reviews.llvm.org/D27569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D27334: [OpenCL] Ambiguous function call.

2016-12-06 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D27334#614389, @bader wrote: > In https://reviews.llvm.org/D27334#613504, @Anastasia wrote: > > > In https://reviews.llvm.org/D27334#612858, @bader wrote: > > > > > In https://reviews.llvm.org/D27334#611703, @Anastasia wrote: > > > > > > >

[PATCH] D27403: [OpenCL] Added a LIT test for ensuring address space mangling is done the same both in OpenCL1.2 and OpenCL2.0.

2016-12-06 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! https://reviews.llvm.org/D27403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30810: Preserve vec3 type.

2017-03-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D30810#706676, @Anastasia wrote: > In https://reviews.llvm.org/D30810#699428, @Anastasia wrote: > > > Would you be able to update ScalarExprEmitter::VisitAsTypeExpr > > implementation accordingly to make things consistent? > > > Not sure it

[PATCH] D30810: Preserve vec3 type.

2017-03-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D30810#699428, @Anastasia wrote: > Would you be able to update ScalarExprEmitter::VisitAsTypeExpr implementation > accordingly to make things consistent? Not sure it got lost somewhere... do you think you could address this too?

[PATCH] D30810: Preserve vec3 type.

2017-03-21 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > Hi Anastasia, Bruno, > > Do you still have other opinion? or Can we go ahead and commit this patch? I would like to see this patch committed. I see clear evidence of it improving existing GPU targets in the master repo as well as outside of the main tree

[PATCH] D31183: [OpenCL] Added parsing for OpenCL vector types.

2017-03-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. Although nothing wrong with the implementation apart from it complicates a bit the understanding of conventional C parse flow by adding extra corner case, I don't see anything in the spec that states explicitly how the vector components should be parsed. I guess with

[PATCH] D31397: [Bug 25404] Fix crash on typedef in OpenCL 2.0

2017-03-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 93226. Anastasia added a comment. Removed check of implicit for new type. https://reviews.llvm.org/D31397 Files: lib/Sema/SemaDecl.cpp test/SemaOpenCL/types.cl Index: test/SemaOpenCL/types.cl

[PATCH] D31397: [Bug 25404] Fix crash on typedef in OpenCL 2.0

2017-03-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaDecl.cpp:2157 if (getDiagnostics().getSuppressSystemWarnings() && - (Context.getSourceManager().isInSystemHeader(Old->getLocation()) || + // Some standard types are defined implicitly in Clang (e.g. OpenCL).

[PATCH] D31397: [Bug 25404] Fix crash on typedef in OpenCL 2.0

2017-03-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia updated this revision to Diff 93225. Anastasia added a comment. Updated with the full diff. https://reviews.llvm.org/D31397 Files: lib/Sema/SemaDecl.cpp test/SemaOpenCL/types.cl Index: test/SemaOpenCL/types.cl ===

[PATCH] D31397: [Bug 25404] Fix crash on typedef in OpenCL 2.0

2017-03-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaDecl.cpp:2157 if (getDiagnostics().getSuppressSystemWarnings() && - (Context.getSourceManager().isInSystemHeader(Old->getLocation()) || + // Some standard types are defined implicitly in Clang (e.g. OpenCL).

[PATCH] D30643: [OpenCL] Extended diagnostics for atomic initialization

2017-03-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/atomic-init.cl:6 +kernel void test_atomic_initialization() { + a1 = 1; // expected-error {{atomic variable can only be assigned to a compile time constant and to variables in global adress space}} + atomic_int a2 =

[PATCH] D31397: [Bug 25404] Fix crash on typedef in OpenCL 2.0

2017-03-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaDecl.cpp:2157 if (getDiagnostics().getSuppressSystemWarnings() && - (Context.getSourceManager().isInSystemHeader(Old->getLocation()) || + // Some standard types are defined implicitly in Clang (e.g. OpenCL).

[PATCH] D31183: [OpenCL] Added parsing for OpenCL vector types.

2017-03-28 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! https://reviews.llvm.org/D31183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31321: [OpenCL] Do not generate "kernel_arg_type_qual" metadata for non-pointer args

2017-03-28 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/CodeGenOpenCL/kernel-arg-info.cl:66 // CHECK: ![[MD13]] = !{!"int*", !"int", !"int", !"float*"} -// CHECK: ![[MD14]] = !{!"restrict", !"const", !"volatile", !"restrict const"} // ARGINFO: ![[MD15]] = !{!"X", !"Y",

[PATCH] D31183: [OpenCL] Added parsing for OpenCL vector types.

2017-03-24 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D31183#709566, @echuraev wrote: > In https://reviews.llvm.org/D31183#708833, @yaxunl wrote: > > > I think this is a good feature for the convenience of user. I've seen usage > > like this. > > > I agree. I don't see any reasons why this

[PATCH] D31324: [OpenCL] Extended mapping of parcing CodeGen arguments

2017-03-24 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! https://reviews.llvm.org/D31324 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30643: [OpenCL] Extended diagnostics for atomic initialization

2017-03-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/atomic-init.cl:6 +kernel void test_atomic_initialization() { + a1 = 1; // expected-error {{atomic variable can only be assigned to a compile time constant and to variables in global adress space}} + atomic_int a2 =

[PATCH] D31404: [OpenCL] Allow alloca return non-zero private pointer

2017-03-30 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. I can't see clearly why the alloca has to be extended to accommodate the address space too? Couldn't the address space for alloca just be taken directly from the data layout? In fact is seems from the LLVM review, an address space for alloca doesn't go into the

[PATCH] D31321: [OpenCL] Do not generate "kernel_arg_type_qual" metadata for non-pointer args

2017-03-30 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! Comment at: test/CodeGenOpenCL/kernel-arg-info.cl:66 // CHECK: ![[MD13]] = !{!"int*", !"int", !"int", !"float*"} -// CHECK: ![[MD14]] = !{!"restrict", !"const",

[PATCH] D30810: Preserve vec3 type.

2017-03-22 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D30810#707176, @jaykang10 wrote: > In https://reviews.llvm.org/D30810#706677, @Anastasia wrote: > > > In https://reviews.llvm.org/D30810#706676, @Anastasia wrote: > > > > > In https://reviews.llvm.org/D30810#699428, @Anastasia wrote: > > > >

[PATCH] D31183: [OpenCL] Added parsing for OpenCL vector types.

2017-03-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. I don't think that diagnostics can always be very clear. This is not the case neither for C nor C++. As I said I don't see any issue to continue with this patch. I would just like to see the test simplified a bit. https://reviews.llvm.org/D31183

[PATCH] D31397: [Bug 25404] Fix crash on typedef in OpenCL 2.0

2017-03-27 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia created this revision. Herald added a subscriber: yaxunl. Fixing the assertion due to absence of source location for implicitly defined types (using addImplicitTypedef()). During Sema checks the source location is being expected and therefore an assertion is triggered. The change is

[PATCH] D31404: [OpenCL] Allow alloca return non-zero private pointer

2017-03-31 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D31404#714906, @yaxunl wrote: > In https://reviews.llvm.org/D31404#714244, @Anastasia wrote: > > > I can't see clearly why the alloca has to be extended to accommodate the > > address space too? Couldn't the address space for alloca just

[PATCH] D30643: [OpenCL] Extended diagnostics for atomic initialization

2017-03-31 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/atomic-init.cl:6 +kernel void test_atomic_initialization() { + a1 = 1; // expected-error {{atomic variable can only be assigned to a compile time constant}} + atomic_int a2 = 0; // expected-error {{atomic variable

[PATCH] D28136: [OpenCL] Implement as_type operator as alias of __builtin_astype.

2017-03-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D28136#701508, @bader wrote: > > From all the above arguments, I feel like the right approach would be to > > implement it as Clang builtin which closely matches the operator semantic > > in my opinion. We could of course reuse the

[PATCH] D30830: [OpenCL] Fix extension guards for atomic functions

2017-03-20 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia closed this revision. Anastasia added a comment. Sorry, I overlooked this indeed. Committed in r298256! https://reviews.llvm.org/D30830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30937: [OpenCL] Added diagnostic for checking length of vector

2017-03-20 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! https://reviews.llvm.org/D30937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30816: [OpenCL] Added implicit conversion rank for overloading functions with vector data type in OpenCL

2017-03-20 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! https://reviews.llvm.org/D30816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30810: Preserve vec3 type.

2017-03-15 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. I don't think there is anything wrong with the generation of vec3->vec4 in Clang. I believe the motivation for this was the OpenCL spec treating vec3 as vec4 aligned type (see section 6.1.5: https://www.khronos.org/registry/OpenCL/specs/opencl-2.0-openclc.pdf#12). So

[PATCH] D28136: [OpenCL] Implement as_type operator as alias of __builtin_astype.

2017-03-16 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! Comment at: lib/Headers/opencl-c.h:6588 -char __ovld __cnfn as_char(char); -char __ovld __cnfn as_char(uchar); - bader wrote: >

[PATCH] D30810: Preserve vec3 type.

2017-03-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D30810#702443, @bruno wrote: > > As a result, I think it would be good for clang to have both of features > > and I would like to stick to the option "-fpresereve-vec3' to change the > > behavior easily. > > The motivation doesn't seem

[PATCH] D26794: [OpenCL] Blocks are allowed to capture arrays in OpenCL 2.0 and higher.

2017-04-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaExpr.cpp:13645 // Blocks are not allowed to capture arrays. + if (!S.getLangOpts().OpenCL && CaptureType->isArrayType()) { I think the comment should be updated. Comment at:

[PATCH] D31745: [OpenCL] Added diagnostic for implicit declaration of function in OpenCL

2017-04-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8254 "%0 cannot be used as the type of a kernel parameter">; +def err_opencl_implicit_function_decl : Error< + "implicit declaration of function %0 is invalid in OpenCL">;

[PATCH] D31745: [OpenCL] Added diagnostic for implicit declaration of function in OpenCL

2017-04-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/clang-builtin-version.cl:32 + work_group_reserve_write_pipe(tmp, tmp); // expected-error{{implicit declaration of function 'work_group_reserve_write_pipe' is invalid in OpenCL}} + // expected-note@-1{{did you mean

[PATCH] D31404: [OpenCL] Allow alloca return non-zero private pointer

2017-04-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/AddressSpaces.h:32 + // QualType represents private address space in OpenCL source code. + Default = 0, + yaxunl wrote: > Anastasia wrote: > > The alloca AS is not taken from the target AS map

[PATCH] D31404: [OpenCL] Allow alloca return non-zero private pointer

2017-04-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. LGTM! Thanks! https://reviews.llvm.org/D31404 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31404: [OpenCL] Allow alloca return non-zero private pointer

2017-04-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/AST/ASTContext.h:2328 +return AddrSpaceMapMangling || + AS >= LangAS::target_first; } So we couldn't use the LangAS::Count instead? I have the same comment in other places that use

[PATCH] D31594: [OpenCL] Enables passing sampler initializer to function argument

2017-04-03 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: test/SemaOpenCL/sampler_t.cl:68 foo(argsmp); - foo(5); // expected-error{{sampler_t variable required - got 'int'}} + foo(CLK_ADDRESS_CLAMP_TO_EDGE | CLK_NORMALIZED_COORDS_TRUE | CLK_FILTER_LINEAR); sampler_t sa[] = {argsmp,

  1   2   3   4   5   6   7   8   9   10   >