annotate clang/test/CodeGen/callback_openmp.c @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
1 // RUN: %clang_cc1 -triple i386-unknown-unknown -fopenmp %s -emit-llvm -o - -disable-llvm-optzns | FileCheck %s
150
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 // CHECK: declare !callback ![[cid:[0-9]+]] void @__kmpc_fork_call
anatofuz
parents:
diff changeset
4 // CHECK: declare !callback ![[cid]] void @__kmpc_fork_teams
anatofuz
parents:
diff changeset
5 // CHECK: ![[cid]] = !{![[cidb:[0-9]+]]}
anatofuz
parents:
diff changeset
6 // CHECK: ![[cidb]] = !{i64 2, i64 -1, i64 -1, i1 true}
anatofuz
parents:
diff changeset
7
anatofuz
parents:
diff changeset
8 void work1(int, int);
anatofuz
parents:
diff changeset
9 void work2(int, int);
anatofuz
parents:
diff changeset
10 void work12(int, int);
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 void foo(int q) {
anatofuz
parents:
diff changeset
13 int p = 2;
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 #pragma omp parallel firstprivate(q, p)
anatofuz
parents:
diff changeset
16 work1(p, q);
anatofuz
parents:
diff changeset
17
anatofuz
parents:
diff changeset
18 #pragma omp parallel for firstprivate(p, q)
anatofuz
parents:
diff changeset
19 for (int i = 0; i < q; i++)
anatofuz
parents:
diff changeset
20 work2(i, p);
anatofuz
parents:
diff changeset
21
anatofuz
parents:
diff changeset
22 #pragma omp target teams firstprivate(p)
anatofuz
parents:
diff changeset
23 work12(p, p);
anatofuz
parents:
diff changeset
24 }