[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-09-11 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: clang/test/OpenMP/amdgpu_throw_trap.cpp:4 +// RUN: %clang_cc1 -fopenmp -triple amdgcn-amd-amdhsa -fopenmp-is-target-device %s -emit-llvm -S -Wno-openmp-target-exception -o - | FileCheck -check-prefix=DEVICE %s +// RUN: %clang_cc1

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-09-11 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: clang/test/OpenMP/amdgpu_throw_trap.cpp:4 +// RUN: %clang_cc1 -fopenmp -triple amdgcn-amd-amdhsa -fopenmp-is-target-device %s -emit-llvm -S -Wno-openmp-target-exception -o - | FileCheck -check-prefix=DEVICE %s +// RUN: %clang_cc1

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-09-11 Thread Anton Rydahl via Phabricator via cfe-commits
AntonRydahl added a comment. Thanks for fixing my tests! This is the second time I messed up the requirements. I am very sorry about that! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153924/new/ https://reviews.llvm.org/D153924

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-09-11 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: clang/test/OpenMP/amdgpu_throw_trap.cpp:4 +// RUN: %clang_cc1 -fopenmp -triple amdgcn-amd-amdhsa -fopenmp-is-target-device %s -emit-llvm -S -Wno-openmp-target-exception -o - | FileCheck -check-prefix=DEVICE %s +// RUN: %clang_cc1

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-09-11 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: clang/test/OpenMP/amdgpu_throw_trap.cpp:4 +// RUN: %clang_cc1 -fopenmp -triple amdgcn-amd-amdhsa -fopenmp-is-target-device %s -emit-llvm -S -Wno-openmp-target-exception -o - | FileCheck -check-prefix=DEVICE %s +// RUN: %clang_cc1

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-09-11 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: clang/test/OpenMP/amdgpu_throw_trap.cpp:4 +// RUN: %clang_cc1 -fopenmp -triple amdgcn-amd-amdhsa -fopenmp-is-target-device %s -emit-llvm -S -Wno-openmp-target-exception -o - | FileCheck -check-prefix=DEVICE %s +// RUN: %clang_cc1

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-31 Thread Anton Rydahl via Phabricator via cfe-commits
AntonRydahl added a comment. Thanks a lot for pointing this out and for fixing my mistakes, Arthur and Hans. I am sorry for the inconvenience! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153924/new/ https://reviews.llvm.org/D153924

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-31 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: clang/test/OpenMP/amdgpu_exceptions.cpp:10 + +// RUN: %clang_cc1 -fopenmp -triple amdgcn-amd-amdhsa -fopenmp-is-target-device -fcxx-exceptions -fexceptions %s -emit-llvm -S -verify=with -Wopenmp-target-exception -analyze +// RUN:

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-30 Thread Arthur Eubanks via Phabricator via cfe-commits
aeubanks added inline comments. Comment at: clang/test/OpenMP/amdgpu_exceptions.cpp:10 + +// RUN: %clang_cc1 -fopenmp -triple amdgcn-amd-amdhsa -fopenmp-is-target-device -fcxx-exceptions -fexceptions %s -emit-llvm -S -verify=with -Wopenmp-target-exception -analyze +// RUN:

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-30 Thread Anton Rydahl via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3c9988f85d25: [OpenMP] Allow exceptions in target regions when offloading to GPUs (authored by AntonRydahl). Repository: rG LLVM Github Monorepo

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-29 Thread Anton Rydahl via Phabricator via cfe-commits
AntonRydahl updated this revision to Diff 554520. AntonRydahl added a comment. Updating the line numbers in the unit tests to match the addition of `// REQUIRES: ` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153924/new/

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-29 Thread Anton Rydahl via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG4c62e943b717: [OpenMP] Allow exceptions in target regions when offloading to GPUs (authored by AntonRydahl). Repository: rG LLVM Github Monorepo

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-29 Thread Anton Rydahl via Phabricator via cfe-commits
AntonRydahl updated this revision to Diff 554401. AntonRydahl added a comment. After landing this patch, two of the unit tests broke aarch64 and Windows build bots. To avoid that, `// REQUIRES:` was added to the unit tests to ensure that they only run when the target triple is supported.

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-28 Thread Anton Rydahl via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0cfc2dba93b1: [OpenMP] Allow exceptions in target regions when offloading to GPUs (authored by AntonRydahl). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-28 Thread Anton Rydahl via Phabricator via cfe-commits
AntonRydahl added a comment. In D153924#4623357 , @jhuber6 wrote: > The libcxx tests are always broken randomly in my experience. I wouldn't > worry about it. Thanks a bunch! I did not know that. Shall I just land the patch? Repository: rG LLVM

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-28 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added a comment. The libcxx tests are always broken randomly in my experience. I wouldn't worry about it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153924/new/ https://reviews.llvm.org/D153924

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-28 Thread Anton Rydahl via Phabricator via cfe-commits
AntonRydahl updated this revision to Diff 554132. AntonRydahl added a comment. Rebased on main to see if libc++ CI is still failing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153924/new/ https://reviews.llvm.org/D153924 Files:

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-28 Thread Anton Rydahl via Phabricator via cfe-commits
AntonRydahl marked 2 inline comments as done. AntonRydahl added inline comments. Comment at: clang/lib/Sema/SemaExprCXX.cpp:869 bool IsThrownVarInScope) { - // Don't report an error if 'throw' is used in system headers. - if

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-28 Thread Anton Rydahl via Phabricator via cfe-commits
AntonRydahl updated this revision to Diff 554034. AntonRydahl marked 2 inline comments as done. AntonRydahl added a comment. Replaced instances of `const llvm::Triple T` with `const llvm::Triple `. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-28 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert accepted this revision. jdoerfert added a comment. This revision is now accepted and ready to land. LG, see below. Comment at: clang/lib/Sema/SemaExprCXX.cpp:869 bool IsThrownVarInScope) { - // Don't report an error if 'throw' is used

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-28 Thread Anton Rydahl via Phabricator via cfe-commits
AntonRydahl marked 2 inline comments as done. AntonRydahl added inline comments. Comment at: clang/test/OpenMP/amdgpu_exceptions.cpp:11 +// RUN: %clang_cc1 -fopenmp -triple amdgcn-amd-amdhsa -fopenmp-is-target-device -fexceptions %s -emit-llvm -S -verify=with

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-28 Thread Anton Rydahl via Phabricator via cfe-commits
AntonRydahl updated this revision to Diff 554021. AntonRydahl added a comment. Moved emission of warnings from CodeGen to Sema to allow using `-verify -analyze`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153924/new/

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/test/OpenMP/amdgpu_exceptions.cpp:11 +// RUN: %clang_cc1 -fopenmp -triple amdgcn-amd-amdhsa -fopenmp-is-target-device -fexceptions %s -emit-llvm -S -verify=with -Wopenmp-target-exception -o - &> /dev/null +// RUN: %clang_cc1

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-19 Thread Johannes Doerfert via Phabricator via cfe-commits
jdoerfert added a comment. I think this is basically done, one question though. Comment at: clang/test/OpenMP/amdgpu_exceptions.cpp:11 +// RUN: %clang_cc1 -fopenmp -triple amdgcn-amd-amdhsa -fopenmp-is-target-device -fexceptions %s -emit-llvm -S -verify=with

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-18 Thread Anton Rydahl via Phabricator via cfe-commits
AntonRydahl updated this revision to Diff 551600. AntonRydahl added a comment. CI tests failed on the built-bot, but that was not related to this patch. I patched the file that made the built-bot fail and rebased this differential after the patch. Repository: rG LLVM Github Monorepo

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-18 Thread Anton Rydahl via Phabricator via cfe-commits
AntonRydahl updated this revision to Diff 551560. AntonRydahl added a comment. Rebased on upstream LLVM to check if flang CI is still affected by this commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153924/new/

[PATCH] D153924: [OpenMP] Allow exceptions in target regions when offloading to GPUs

2023-08-17 Thread Anton Rydahl via Phabricator via cfe-commits
AntonRydahl updated this revision to Diff 551323. AntonRydahl added a comment. Avoided changing clang/lib/Frontend/CompilerInvocation.cpp by performing checks for OpenMP offloading to GPU devices in Sema instead. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION