llvm.org GIT mirror llvm / 0ded57c
[NVPTX] Add support for .managed variables for UVM git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211942 91177308-0d34-0410-b5e6-96231b3b80d8 Justin Holewinski 6 years ago
2 changed file(s) with 16 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
14791479
14801480 O << ".";
14811481 emitPTXAddressSpace(PTy->getAddressSpace(), O);
1482
1483 if (isManaged(*GVar)) {
1484 O << " .attribute(.managed)";
1485 }
1486
14821487 if (GVar->getAlignment() == 0)
14831488 O << " .align " << (int) TD->getPrefTypeAlignment(ETy);
14841489 else
0 ; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
1
2
3 ; CHECK: .visible .global .align 4 .u32 device_g;
4 @device_g = addrspace(1) global i32 zeroinitializer
5 ; CHECK: .visible .global .attribute(.managed) .align 4 .u32 managed_g;
6 @managed_g = addrspace(1) global i32 zeroinitializer
7
8
9 !nvvm.annotations = !{!0}
10 !0 = metadata !{i32 addrspace(1)* @managed_g, metadata !"managed", i32 1}