[OpenMP] Prevent emission of exception handling code when using OpenMP to offload to NVIDIA devices.
Summary: For the OpenMP toolchain which offloads to NVIDIA GPUs make sure that no exception handling code is emitted.
Reviewers: arpith-jacob, sfantao, caomhin, carlo.bertolli, ABataev, Hahnfeld, hfinkel, tstellar
Reviewed By: ABataev, Hahnfeld
Subscribers: rengolin, Hahnfeld, cfe-commits
Differential Revision: https://reviews.llvm.org/D29904
llvm-svn: 310306
2017-08-08 04:57:59 +08:00
|
|
|
/// Make sure no exception messages are inclided in the llvm output.
|
|
|
|
// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple powerpc64le-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm-bc %s -o %t-ppc-host.bc
|
|
|
|
// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck %s --check-prefix CHK-EXCEPTION
|
[OpenMP][AMDGCN] Support OpenMP offloading for AMDGCN architecture - Part 1
Summary:
Allow AMDGCN as a GPU offloading target for OpenMP during compiler
invocation and allow setting CUDAMode for it.
Originally authored by Greg Rodgers (@gregrodgers).
Reviewers: ronlieb, yaxunl, b-sumner, scchan, JonChesterfield, jdoerfert, sameerds, msearles, hliao, arsenm
Reviewed By: sameerds
Subscribers: sstefan1, jvesely, wdng, arsenm, guansong, dexonsmith, cfe-commits, llvm-commits, gregrodgers
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D79754
2020-05-14 14:09:04 +08:00
|
|
|
// RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -triple x86_64-unknown-unknown -fopenmp-targets=amdgcn-amd-amdhsa -emit-llvm %s -fopenmp-is-device -fopenmp-host-ir-file-path %t-ppc-host.bc -o - | FileCheck %s --check-prefix CHK-EXCEPTION
|
[OpenMP] Prevent emission of exception handling code when using OpenMP to offload to NVIDIA devices.
Summary: For the OpenMP toolchain which offloads to NVIDIA GPUs make sure that no exception handling code is emitted.
Reviewers: arpith-jacob, sfantao, caomhin, carlo.bertolli, ABataev, Hahnfeld, hfinkel, tstellar
Reviewed By: ABataev, Hahnfeld
Subscribers: rengolin, Hahnfeld, cfe-commits
Differential Revision: https://reviews.llvm.org/D29904
llvm-svn: 310306
2017-08-08 04:57:59 +08:00
|
|
|
|
|
|
|
void test_increment() {
|
|
|
|
#pragma omp target
|
|
|
|
{
|
|
|
|
[]() { return; }();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
test_increment();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
//CHK-EXCEPTION-NOT: invoke
|
|
|
|
|