mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
[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
This commit is contained in:
parent
2a8dc35cca
commit
0ded57ccc5
@ -1480,6 +1480,11 @@ void NVPTXAsmPrinter::printModuleLevelGV(const GlobalVariable *GVar,
|
||||
|
||||
O << ".";
|
||||
emitPTXAddressSpace(PTy->getAddressSpace(), O);
|
||||
|
||||
if (isManaged(*GVar)) {
|
||||
O << " .attribute(.managed)";
|
||||
}
|
||||
|
||||
if (GVar->getAlignment() == 0)
|
||||
O << " .align " << (int) TD->getPrefTypeAlignment(ETy);
|
||||
else
|
||||
|
11
test/CodeGen/NVPTX/managed.ll
Normal file
11
test/CodeGen/NVPTX/managed.ll
Normal file
@ -0,0 +1,11 @@
|
||||
; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck %s
|
||||
|
||||
|
||||
; CHECK: .visible .global .align 4 .u32 device_g;
|
||||
@device_g = addrspace(1) global i32 zeroinitializer
|
||||
; CHECK: .visible .global .attribute(.managed) .align 4 .u32 managed_g;
|
||||
@managed_g = addrspace(1) global i32 zeroinitializer
|
||||
|
||||
|
||||
!nvvm.annotations = !{!0}
|
||||
!0 = metadata !{i32 addrspace(1)* @managed_g, metadata !"managed", i32 1}
|
Loading…
x
Reference in New Issue
Block a user