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
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
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;
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
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)
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
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;
---
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
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
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
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
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
12 matches
Mail list logo