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:
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
-
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
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
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
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
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
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
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
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
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
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
___
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
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
14 matches
Mail list logo