annotate clang/test/AST/ast-dump-managed-var.cu @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 // RUN: %clang_cc1 -ast-dump -x hip %s | FileCheck %s
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 // RUN: %clang_cc1 -ast-dump -fcuda-is-device -x hip %s | FileCheck %s
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 #include "Inputs/cuda.h"
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 // CHECK-LABEL: VarDecl {{.*}} m1 'int'
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 // CHECK-NEXT: HIPManagedAttr
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 // CHECK-NEXT: CUDADeviceAttr {{.*}}Implicit
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 __managed__ int m1;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 // CHECK-LABEL: VarDecl {{.*}} m2 'int'
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 // CHECK-NEXT: HIPManagedAttr
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 // CHECK-NEXT: CUDADeviceAttr {{.*}}Implicit
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 // CHECK-NOT: HIPManagedAttr
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 // CHECK-NOT: CUDADeviceAttr
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 __managed__ __managed__ int m2;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 // CHECK-LABEL: VarDecl {{.*}} m3 'int'
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 // CHECK-NEXT: HIPManagedAttr
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 // CHECK-NEXT: CUDADeviceAttr {{.*}}line
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 // CHECK-NOT: CUDADeviceAttr {{.*}}Implicit
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 __managed__ __device__ int m3;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 // CHECK-LABEL: VarDecl {{.*}} m3a 'int'
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 // CHECK-NEXT: CUDADeviceAttr {{.*}}cuda.h
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 // CHECK-NEXT: HIPManagedAttr
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 // CHECK-NOT: CUDADeviceAttr {{.*}}Implicit
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 __device__ __managed__ int m3a;