[PATCH] D46667: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file

2018-06-01 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC333746: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file (authored by erichkeane, committed by ). Changed prior to commit: https://reviews.llvm.org/D46667?vs=147538&id=149441#toc Repository:

[PATCH] D46667: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file

2018-05-23 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/SemaOpenCL/with_openmp.cl:1 +// RUN: %clang_cc1 -verify -fopenmp -ast-dump -x cl %s 2>&1 | FileCheck %s +// expected-no-diagnostics -

[PATCH] D46667: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file

2018-05-18 Thread Mike Rice via Phabricator via cfe-commits
mikerice added inline comments. Comment at: test/SemaOpenCL/with_openmp.cl:1 +// RUN: %clang_cc1 -verify -fopenmp -ast-dump -x cl %s 2>&1 | FileCheck %s +// expected-no-diagnostics ABataev wrote: > Still the same question, do we really want to support full OpenMP

[PATCH] D46667: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file

2018-05-18 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: test/SemaOpenCL/with_openmp.cl:1 +// RUN: %clang_cc1 -verify -fopenmp -ast-dump -x cl %s 2>&1 | FileCheck %s +// expected-no-diagnostics Still the same question, do we really want to support full OpenMP for OpenCL or on

[PATCH] D46667: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file

2018-05-18 Thread Mike Rice via Phabricator via cfe-commits
mikerice updated this revision to Diff 147538. mikerice added a comment. Sorry for the delay in getting back to this. I've found that we are using many OpenMP directives not just simd. We'd like to continue doing that. I updated the patch to provide TypeSourceInfo for OMPCapturedExprDecls. I

[PATCH] D46667: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file

2018-05-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaDecl.cpp:11348 // initialiser -if (var->getTypeSourceInfo()->getType()->isBlockPointerType() && -!var->hasInit()) { +if (var->getType()->isBlockPointerType() && !var->hasInit()) { Diag(var->getL

[PATCH] D46667: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file

2018-05-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaDecl.cpp:11348 // initialiser -if (var->getTypeSourceInfo()->getType()->isBlockPointerType() && -!var->hasInit()) { +if (var->getType()->isBlockPointerType() && !var->hasInit()) { Diag(var->getLoc

[PATCH] D46667: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file

2018-05-10 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. In https://reviews.llvm.org/D46667#1094340, @Anastasia wrote: > OpenCL C is based on C99, so OpenMP isn't enabled by default. But in your > tests you use `-fopenmp` to activate it. > > OpenCL general philosophy is that vectors are written explicitly, but it's > not alwa

[PATCH] D46667: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file

2018-05-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: lib/Sema/SemaDecl.cpp:11348 // initialiser -if (var->getTypeSourceInfo()->getType()->isBlockPointerType() && -!var->hasInit()) { +if (var->getType()->isBlockPointerType() && !var->hasInit()) { Diag(var->getL

[PATCH] D46667: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file

2018-05-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. OpenCL C is based on C99, so OpenMP isn't enabled by default. But in your tests you use `-fopenmp` to activate it. OpenCL general philosophy is that vectors are written explicitly, but it's not always very easy. In OpenCL C++ we have added an attribute hint for auto

[PATCH] D46667: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file

2018-05-09 Thread Mike Rice via Phabricator via cfe-commits
mikerice added a comment. 1. It probably makes sense to allow omp simd with OpenCL. Some people here have been successfully using it anyway. 2. I can give that a try. The test just tests that the compiler doesn't segfault. What would you prefer instead, something that checks the AST or the co

[PATCH] D46667: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file

2018-05-09 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. 1. Is this allowed to use OpenMP for OpenCL programs at all? 2. If it is allowed, I think it would be better to set the TypeSourceInfo for the artificial variable Repository: rC Clang https://reviews.llvm.org/D46667 ___

[PATCH] D46667: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file

2018-05-09 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. BTW, the test itself does not check anything. Repository: rC Clang https://reviews.llvm.org/D46667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46667: [OpenCL, OpenMP] Fix crash when OpenMP used in OpenCL file

2018-05-09 Thread Mike Rice via Phabricator via cfe-commits
mikerice created this revision. mikerice added reviewers: Anastasia, ABataev, erichkeane, cfe-commits. Herald added subscribers: guansong, yaxunl. Compiler crashes when omp simd is used in an OpenCL file: clang -c -fopenmp omp_simd.cl __kernel void test(__global int *data, int size) { #pragma