File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -55,11 +55,21 @@ function llvm_machine(target::PTXCompilerTarget)
55
55
end
56
56
57
57
# the default datalayout does not match the one in the NVPTX user guide
58
- llvm_datalayout (target:: PTXCompilerTarget ) = Int=== Int64 ?
59
- " e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" *
60
- " -f32:32:32-f64:64:64-v16:16:16-v32:32:32-v64:64:64-v128:128:128-n16:32:64" :
61
- " e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64" *
62
- " -f32:32:32-f64:64:64-v16:16:16-v32:32:32-v64:64:64-v128:128:128-n16:32:64"
58
+ llvm_datalayout (target:: PTXCompilerTarget ) =
59
+ # little endian
60
+ " e-" *
61
+ # on 32-bit systems, use 32-bit pointers.
62
+ # on 64-bit systems, use 64-bit pointers, but prefer 32-bit indexing.
63
+ # this is not what the NVPTX user guide recommends, but helps for performance.
64
+ (Int === Int64 ? " p:64:64:64:32-" : " p:32:32:32-" ) *
65
+ # alignment of integer types
66
+ " i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-" *
67
+ # alignment of floating point types
68
+ " f32:32:32-f64:64:64-" *
69
+ # alignment of vector types
70
+ " v16:16:16-v32:32:32-v64:64:64-v128:128:128-" *
71
+ # native integer widths
72
+ " n16:32:64"
63
73
64
74
have_fma (@nospecialize (target:: PTXCompilerTarget ), T:: Type ) = true
65
75
You can’t perform that action at this time.
0 commit comments