[PATCH] D67837: [CUDA][HIP] Fix host/device check with -fopenmp

2019-10-09 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG229c78d3a5d1: [CUDA][HIP] Fix host/device check with -fopenmp (authored by yaxunl). Changed prior to commit: https://reviews.llvm.org/D67837?vs=224126&id=224208#toc Repository: rG LLVM Github Monorep

[PATCH] D67837: [CUDA][HIP] Fix host/device check with -fopenmp

2019-10-09 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67837/new/ https://reviews.llvm.org/D67837 ___ cfe-commits mailing list cfe-commits@l

[PATCH] D67837: [CUDA][HIP] Fix host/device check with -fopenmp

2019-10-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: lib/Sema/SemaCUDA.cpp:604 // Do we know that we will eventually codegen the given function? static bool IsKnownEmitted(Sema &S, FunctionDecl *FD) { + return S.getEmissionStatus(FD) == Sema::FunctionEmissionStatus::Emitted;

[PATCH] D67837: [CUDA][HIP] Fix host/device check with -fopenmp

2019-10-09 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 224126. yaxunl marked 8 inline comments as done. yaxunl added a comment. revised by Alexey's comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67837/new/ https://reviews.llvm.org/D67837 Files: include/clang/Sema/Sema.h lib/Sema/SemaCUDA.cp

[PATCH] D67837: [CUDA][HIP] Fix host/device check with -fopenmp

2019-10-08 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaCUDA.cpp:616 if (getLangOpts().CUDAIsDevice) { -return IsKnownEmitted(*this, dyn_cast(CurContext)) +return (getEmissionStatus(dyn_cast(CurContext)) == +FunctionEmissionStatus::Emitted)

[PATCH] D67837: [CUDA][HIP] Fix host/device check with -fopenmp

2019-10-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 223712. yaxunl marked 14 inline comments as done. yaxunl added a comment. revised by Alexey's comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67837/new/ https://reviews.llvm.org/D67837 Files: include/clang/Sema/Sema.h lib/Sema/SemaCUDA.c

[PATCH] D67837: [CUDA][HIP] Fix host/device check with -fopenmp

2019-10-07 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaCUDA.cpp:604 // Do we know that we will eventually codegen the given function? static bool IsKnownEmitted(Sema &S, FunctionDecl *FD) { + return S.getEmissionStatus(FD) == Sema::FunctionEmissionStatus::Emitted; ---

[PATCH] D67837: [CUDA][HIP] Fix host/device check with -fopenmp

2019-10-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 223284. yaxunl marked 6 inline comments as done. yaxunl added a comment. Revised by Alexey's comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67837/new/ https://reviews.llvm.org/D67837 Files: include/clang/Sema/Sema.h lib/Sema/SemaCUDA.cp

[PATCH] D67837: [CUDA][HIP] Fix host/device check with -fopenmp

2019-10-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 12 inline comments as done. yaxunl added inline comments. Comment at: lib/Sema/SemaDecl.cpp:17618 + + if (LangOpts.CUDA) { +// When compiling for device, host functions are never emitted. Similarly, ABataev wrote: > Are you going to handle `#p

[PATCH] D67837: [CUDA][HIP] Fix host/device check with -fopenmp

2019-10-01 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Sema/SemaDecl.cpp:17618 + + if (LangOpts.CUDA) { +// When compiling for device, host functions are never emitted. Similarly, Are you going to handle `#pragma omp declare target device_type(nohost)` in Cuda mod

[PATCH] D67837: [CUDA][HIP] Fix host/device check with -fopenmp

2019-09-30 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping @ABataev Any comments? Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67837/new/ https://reviews.llvm.org/D67837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[PATCH] D67837: [CUDA][HIP] Fix host/device check with -fopenmp

2019-09-25 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. That looks great. I'm probably not the best person to validate that the OMP / CUDA logic is still right, but it seems like the right technical design. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67837/new/ https://reviews.llvm.org/D67837