Skip to content

Commit 2215973

Browse files
committed
Update docstrings.
1 parent ce7aed0 commit 2215973

File tree

3 files changed

+28
-14
lines changed

3 files changed

+28
-14
lines changed

docs/src/man/codegen.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,13 @@ julia> String(emit(tm, mod, LLVM.API.LLVMAssemblyFile)) |> println
100100
.text
101101
.file "SomeModule"
102102
.section .custom_section.target_features,"",@
103-
.int8 1
103+
.int8 3
104+
.int8 43
105+
.int8 15
106+
.ascii "mutable-globals"
107+
.int8 43
108+
.int8 8
109+
.ascii "sign-ext"
104110
.int8 43
105111
.int8 8
106112
.ascii "memory64"
@@ -134,6 +140,11 @@ julia> mod
134140
; ModuleID = 'SomeModule'
135141
source_filename = "SomeModule"
136142
target datalayout = "e-m:e-p:64:64-i64:64-n32:64-S128"
143+
144+
!llvm.module.flags = !{!0, !1}
145+
146+
!0 = !{i32 1, !"wasm-feature-mutable-globals", i32 43}
147+
!1 = !{i32 1, !"wasm-feature-sign-ext", i32 43}
137148
```
138149

139150
The data layout object can be used to query various properties that are relevant for

docs/src/man/functions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ julia> isoverloaded(intr)
6868
true
6969
7070
julia> LLVM.Function(mod, intr, [LLVM.Int32Type()])
71-
; Function Attrs: nocallback nofree nosync nounwind readnone speculatable willreturn
71+
; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
7272
declare i32 @llvm.abs.i32(i32, i1 immarg) #0
7373
```
7474

@@ -108,13 +108,13 @@ Different kinds of attributes are supported:
108108

109109
```jldoctest
110110
julia> EnumAttribute("nounwind")
111-
EnumAttribute 39=0
111+
EnumAttribute 36=0
112112
113113
julia> StringAttribute("frame-pointer", "none")
114114
StringAttribute frame-pointer=none
115115
116116
julia> TypeAttribute("byval", LLVM.Int32Type())
117-
TypeAttribute 72=LLVM.IntegerType(i32)
117+
TypeAttribute 70=LLVM.IntegerType(i32)
118118
```
119119

120120

docs/src/man/interop.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,11 @@ add(1,2)
9191
9292
# output
9393
94-
define i64 @julia_add_3944(i64 signext %0, i64 signext %1) #0 {
94+
; Function Signature: add(Int64, Int64)
95+
define i64 @julia_add_3944(i64 signext %"x::Int64", i64 signext %"y::Int64") #0 {
9596
top:
96-
%2 = add i64 %1, %0
97-
ret i64 %2
97+
%0 = add i64 %"y::Int64", %"x::Int64"
98+
ret i64 %0
9899
}
99100
3
100101
```
@@ -165,10 +166,11 @@ intrinsic calls:
165166
julia> max(a, b) = a < b ? b : a;
166167
167168
julia> @code_llvm debuginfo=:none max(1,2)
168-
define i64 @julia_max_509(i64 signext %0, i64 signext %1) #0 {
169+
; Function Signature: max(Int64, Int64)
170+
define i64 @julia_max_22435(i64 signext %"a::Int64", i64 signext %"b::Int64") #0 {
169171
top:
170-
%2 = call i64 @llvm.smax.i64(i64 %0, i64 %1)
171-
ret i64 %2
172+
%"a::Int64.b::Int64" = call i64 @llvm.smax.i64(i64 %"a::Int64", i64 %"b::Int64")
173+
ret i64 %"a::Int64.b::Int64"
172174
}
173175
174176
julia> function max(a, b)
@@ -177,11 +179,12 @@ julia> function max(a, b)
177179
end;
178180
179181
julia> @code_llvm debuginfo=:none max(1,2)
180-
define i64 @julia_max_529(i64 signext %0, i64 signext %1) #0 {
182+
; Function Signature: max(Int64, Int64)
183+
define i64 @julia_max_22441(i64 signext %"a::Int64", i64 signext %"b::Int64") #0 {
181184
top:
182-
%2 = icmp slt i64 %1, %0
183-
call void @llvm.assume(i1 %2)
184-
ret i64 %0
185+
%0 = icmp slt i64 %"b::Int64", %"a::Int64"
186+
call void @llvm.assume(i1 %0)
187+
ret i64 %"a::Int64"
185188
}
186189
```
187190

0 commit comments

Comments
 (0)