forked from zufuliu/notepad4
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLLVM.ll
More file actions
403 lines (378 loc) · 8.33 KB
/
LLVM.ll
File metadata and controls
403 lines (378 loc) · 8.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
; LLVM 10 https://llvm.org/docs/LangRef.html
;! Keywords ===========================================================
; Linkage Types
private
internal
available_externally
linkonce
weak
common
appending
extern_weak
linkonce_odr
weak_odr
external
; Global Variables
global
constant
; Functions
define
section
comdat
gc
prefix
prologue
personality
; Aliases
alias
; IFuncs
ifunc
; Parameter Attributes
declare
; Attribute Groups
attributes
; Module-Level Inline Assembly
module asm
; Data Layout
target datalayout
; Target Triple
target triple
; Use-list Order Directives
uselistorder uselistorder_bb
; Source Filename
source_filename
; Constants
true false
null none
global
undef
; Metadata
distinct
;! Type ===========================================================
void
i1 i8 i16 i32 i64 i128
half
float
double
fp128
x86_fp80
ppc_fp128
x86_mmx
vscale ; Vector Type
label ; Label Type
token ; Token Type
metadata ; Metadata Type
type ; Structure Type
opaque ; Opaque Structure Types
;! Attribute ===========================================================
; Calling Conventions
ccc
fastcc
coldcc
webkit_jscc
anyregcc
preserve_mostcc
preserve_allcc
cxx_fast_tlscc
swiftcc
tailcc
cfguard_checkcc
; Visibility Styles
default
hidden
protected
; DLL Storage Classes
dllimport
dllexport
; Thread Local Storage Models
thread_local()
localdynamic
initialexec
localexec
; Runtime Preemption Specifiers
dso_preemptable
dso_local
; Global Variables
unnamed_addr
local_unnamed_addr
; Comdats
any
exactmatch
largest
noduplicates
samesize
; Parameter Attributes
zeroext
signext
inreg
byval
byval(<ty>)
inalloca
sret
align <n>
noalias
nocapture
nofree
nest
returned
nonnull
dereferenceable(<n>)
dereferenceable_or_null(<n>)
swiftself
swifterror
immarg
; Function Attributes
alignstack(<n>)
allocsize(<EltSizeParam>[, <NumEltsParam>])
alwaysinline
builtin
cold
convergent
inaccessiblememonly
inaccessiblemem_or_argmemonly
inlinehint
jumptable
minsize
naked
no-inline-line-tables
no-jump-tables
nobuiltin
noduplicate
nofree
noimplicitfloat
noinline
nonlazybind
noredzone
indirect-tls-seg-refs
noreturn
norecurse
willreturn
nosync
nounwind
null-pointer-is-valid
optforfuzzing
optnone
optsize
patchable-function
probe-stack
readnone
readonly
stack-probe-size
no-stack-arg-probe
writeonly
argmemonly
returns_twice
safestack
sanitize_address
sanitize_memory
sanitize_thread
sanitize_hwaddress
sanitize_memtag
speculative_load_hardening
speculatable
ssp
sspreq
sspstrong
strictfp
thunk
uwtable
nocf_check
shadowcallstack
; Atomic Memory Ordering Constraints
unordered
monotonic
acquire
release
acq_rel
seq_cst
; Fast-Math Flags
nnan
ninf
nsz
arcp
contract
afn
reassoc
fast
; Pointer Type
addrspace()
; Constants
zeroinitializer
blockaddress(@function, %block)
; Inline Assembler
sideeffect
alignstack
inteldialect
; Instruction
nuw
nsw
exact
atomic
volatile
inbounds
inrange
syncscope("<target-scope>")
;! Instruction ===========================================================
; Terminator Instructions
ret <type> <value>
ret void
br i1 <cond>, label <iftrue>, label <iffalse>
br label <dest>
switch <intty> <value>, label <defaultdest> [ <intty> <val>, label <dest> ... ]
indirectbr <somety>* <address>, [ label <dest1>, label <dest2>, ... ]
invoke [cconv] [ret attrs] [addrspace(<num>)] <ty>|<fnty> <fnptrval>(<function args>) [fn attrs]
[operand bundles] to label <normal label>
unwind label <exception label>
callbr [cconv] [ret attrs] [addrspace(<num>)] <ty>|<fnty> <fnptrval>(<function args>) [fn attrs]
[operand bundles] to label <normal label> [other labels]
resume <type> <value>
catchswitch
within <parent> [ label <handler1>, label <handler2>, ... ] unwind to
caller
catchswitch within <parent> [ label <handler1>, label <handler2>, ... ] unwind label <default>
catchret
from <token> to label <normal>
cleanupret from <value> unwind label <continue>
cleanupret from <value> unwind to caller
unreachable
; Unary Operations
fneg [fast-math flags]* <ty> <op1>
; Binary Operations
add <ty> <op1>, <op2>
add nuw <ty> <op1>, <op2>
add nsw <ty> <op1>, <op2>
add nuw nsw <ty> <op1>, <op2>
fadd [fast-math flags]* <ty> <op1>, <op2>
sub <ty> <op1>, <op2>
sub nuw <ty> <op1>, <op2>
sub nsw <ty> <op1>, <op2>
sub nuw nsw <ty> <op1>, <op2>
fsub [fast-math flags]* <ty> <op1>, <op2>
mul <ty> <op1>, <op2>
mul nuw <ty> <op1>, <op2>
mul nsw <ty> <op1>, <op2>
mul nuw nsw <ty> <op1>, <op2>
fmul [fast-math flags]* <ty> <op1>, <op2>
udiv <ty> <op1>, <op2>
udiv exact <ty> <op1>, <op2>
sdiv <ty> <op1>, <op2>
sdiv exact <ty> <op1>, <op2>
fdiv [fast-math flags]* <ty> <op1>, <op2>
urem <ty> <op1>, <op2>
srem <ty> <op1>, <op2>
frem [fast-math flags]* <ty> <op1>, <op2>
; Bitwise Binary Operations
shl <ty> <op1>, <op2>
shl nuw <ty> <op1>, <op2>
shl nsw <ty> <op1>, <op2>
shl nuw nsw <ty> <op1>, <op2>
lshr <ty> <op1>, <op2>
lshr exact <ty> <op1>, <op2>
ashr <ty> <op1>, <op2>
ashr exact <ty> <op1>, <op2>
and <ty> <op1>, <op2>
or <ty> <op1>, <op2>
xor <ty> <op1>, <op2>
; Vector Operations
extractelement <n x <ty>> <val>, <ty2> <idx>
extractelement <vscale x n x <ty>> <val>, <ty2> <idx>
insertelement <n x <ty>> <val>, <ty> <elt>, <ty2> <idx>
insertelement <vscale x n x <ty>> <val>, <ty> <elt>, <ty2> <idx>
shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <m x i32> <mask>
shufflevector <vscale x n x <ty>> <v1>, <vscale x n x <ty>> v2, <vscale x m x i32> <mask>
; Aggregate Operations
extractvalue <aggregate type> <val>, <idx>{, <idx>}*
insertvalue <aggregate type> <val>, <ty> <elt>, <idx>{, <idx>}*
; Memory Access and Addressing Operations
alloca [inalloca] <type> [, <ty> <NumElements>] [, align <alignment>] [, addrspace(<num>)]
load [volatile] <ty>, <ty>* <pointer>[, align <alignment>][, !nontemporal !<index>][, !invariant.load !<index>][, !invariant.group !<index>][, !nonnull !<index>][, !dereferenceable !<deref_bytes_node>][, !dereferenceable_or_null !<deref_bytes_node>][, !align !<align_node>]
load atomic [volatile] <ty>, <ty>* <pointer> [syncscope("<target-scope>")] <ordering>, align <alignment> [, !invariant.group !<index>]
!<index> = !{ i32 1 }
!<deref_bytes_node> = !{i64 <dereferenceable_bytes>}
!<align_node> = !{ i64 <value_alignment> }
store [volatile] <ty> <value>, <ty>* <pointer>[, align <alignment>][, !nontemporal !<index>][, !invariant.group !<index>]
store atomic [volatile] <ty> <value>, <ty>* <pointer> [syncscope("<target-scope>")] <ordering>, align <alignment> [, !invariant.group !<index>]
fence [syncscope("<target-scope>")] <ordering>
cmpxchg [weak] [volatile] <ty>* <pointer>, <ty> <cmp>, <ty> <new> [syncscope("<target-scope>")] <success ordering> <failure ordering>
atomicrmw [volatile] <operation> <ty>* <pointer>, <ty> <value> [syncscope("<target-scope>")] <ordering>
xchg
add
sub
and
nand
or
xor
max
min
umax
umin
fadd
fsub
getelementptr <ty>, <ty>* <ptrval>{, [inrange] <ty> <idx>}*
getelementptr inbounds <ty>, <ty>* <ptrval>{, [inrange] <ty> <idx>}*
getelementptr <ty>, <ptr vector> <ptrval>, [inrange] <vector index type> <idx>
; Conversion Operations
trunc <ty> <value>
to <ty2>
zext <ty> <value> to <ty2>
sext <ty> <value> to <ty2>
fptrunc <ty> <value> to <ty2>
fpext <ty> <value> to <ty2>
fptoui <ty> <value> to <ty2>
fptosi <ty> <value> to <ty2>
uitofp <ty> <value> to <ty2>
sitofp <ty> <value> to <ty2>
ptrtoint <ty> <value> to <ty2>
inttoptr <ty> <value> to <ty2>[, !dereferenceable !<deref_bytes_node>][, !dereferenceable_or_null !<deref_bytes_node]
bitcast <ty> <value> to <ty2>
addrspacecast <pty> <ptrval> to <pty2>
; Other Operations
icmp <cond> <ty> <op1>, <op2>
eq
ne
ugt
uge
ult
ule
sgt
sge
slt
sle
fcmp [fast-math flags]* <cond> <ty> <op1>, <op2>
oeq
ogt
oge
olt
ole
one
ord
ueq
ugt
uge
ult
ule
une
uno
phi [fast-math-flags] <ty> [ <val0>, <label0>], ...
select [fast-math flags] selty <cond>, <ty> <val1>, <ty> <val2>
call [fast-math flags] [cconv] [ret attrs] [addrspace(<num>)]
<ty>|<fnty> <fnptrval>(<function args>) [fn attrs] [ operand bundles ]
tail
musttail
notail
va_arg <va_list*> <arglist>, <argty>
landingpad <resultty> <clause>+
landingpad <resultty>
cleanup <clause>*
catch <type> <value>
filter <array constant type> <array constant>
catchpad within <catchswitch> [<args>*]
cleanuppad within <parent> [<args>*]
;! Metadata ===========================================================
;! Intrinsic ===========================================================
; Intrinsic Global Variables
@llvm.used
@llvm.compiler.used
@llvm.global_ctors
@llvm.global_dtors
; Intrinsic Functions