| 1 |
// RUN: echo "GPU binary would be here" > %t |
| 2 |
// RUN: %clang_cc1 -fprofile-instrument=clang -triple x86_64-linux-gnu -target-sdk-version=8.0 -fcuda-include-gpubinary %t -emit-llvm -o - %s | FileCheck --check-prefix=PGOGEN %s |
| 3 |
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -triple x86_64-linux-gnu -target-sdk-version=8.0 -fcuda-include-gpubinary %t -emit-llvm -o - %s | FileCheck --check-prefix=COVMAP %s |
| 4 |
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -dump-coverage-mapping -triple x86_64-linux-gnu -target-sdk-version=8.0 -fcuda-include-gpubinary %t -emit-llvm-only -o - %s | FileCheck --check-prefix=MAPPING %s |
| 5 |
|
| 6 |
#include "Inputs/cuda.h" |
| 7 |
|
| 8 |
// PGOGEN-NOT: @__profn_{{.*kernel.*}} = |
| 9 |
// COVMAP-COUNT-33: section "__llvm_covfun", comdat |
| 10 |
// COVMAP-NOT: section "__llvm_covfun", comdat |
| 11 |
// MAPPING-NOT: {{.*dfn.*}}: |
| 12 |
// MAPPING-NOT: {{.*kernel.*}}: |
| 13 |
|
| 14 |
__device__ void dfn(int i) {} |
| 15 |
|
| 16 |
__global__ void kernel(int i) { dfn(i); } |
| 17 |
|
| 18 |
void host(void) { |
| 19 |
kernel<<<1, 1>>>(1); |
| 20 |
} |