1 //===- LLVMBitCodes.h - Enum values for the LLVM bitcode format -*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This header defines Bitcode enum values for LLVM IR bitcode files.
11 // The enum values defined in this file should be considered permanent. If
12 // new features are added, they should have values added at the end of the
15 //===----------------------------------------------------------------------===//
17 #ifndef LLVM_BITCODE_LLVMBITCODES_H
18 #define LLVM_BITCODE_LLVMBITCODES_H
20 #include "llvm/Bitstream/BitCodes.h"
24 // The only top-level block types are MODULE, IDENTIFICATION, STRTAB and SYMTAB.
27 MODULE_BLOCK_ID
= FIRST_APPLICATION_BLOCKID
,
29 // Module sub-block id's.
31 PARAMATTR_GROUP_BLOCK_ID
,
36 // Block intended to contains information on the bitcode versioning.
37 // Can be used to provide better error messages when we fail to parse a
39 IDENTIFICATION_BLOCK_ID
,
41 VALUE_SYMTAB_BLOCK_ID
,
43 METADATA_ATTACHMENT_ID
,
49 MODULE_STRTAB_BLOCK_ID
,
50 GLOBALVAL_SUMMARY_BLOCK_ID
,
52 OPERAND_BUNDLE_TAGS_BLOCK_ID
,
54 METADATA_KIND_BLOCK_ID
,
58 FULL_LTO_GLOBALVAL_SUMMARY_BLOCK_ID
,
62 SYNC_SCOPE_NAMES_BLOCK_ID
,
65 /// Identification block contains a string that describes the producer details,
66 /// and an epoch that defines the auto-upgrade capability.
67 enum IdentificationCodes
{
68 IDENTIFICATION_CODE_STRING
= 1, // IDENTIFICATION: [strchr x N]
69 IDENTIFICATION_CODE_EPOCH
= 2, // EPOCH: [epoch#]
72 /// The epoch that defines the auto-upgrade compatibility for the bitcode.
74 /// LLVM guarantees in a major release that a minor release can read bitcode
75 /// generated by previous minor releases. We translate this by making the reader
76 /// accepting only bitcode with the same epoch, except for the X.0 release which
78 enum { BITCODE_CURRENT_EPOCH
= 0 };
80 /// MODULE blocks have a number of optional fields and subblocks.
82 MODULE_CODE_VERSION
= 1, // VERSION: [version#]
83 MODULE_CODE_TRIPLE
= 2, // TRIPLE: [strchr x N]
84 MODULE_CODE_DATALAYOUT
= 3, // DATALAYOUT: [strchr x N]
85 MODULE_CODE_ASM
= 4, // ASM: [strchr x N]
86 MODULE_CODE_SECTIONNAME
= 5, // SECTIONNAME: [strchr x N]
88 // FIXME: Remove DEPLIB in 4.0.
89 MODULE_CODE_DEPLIB
= 6, // DEPLIB: [strchr x N]
91 // GLOBALVAR: [pointer type, isconst, initid,
92 // linkage, alignment, section, visibility, threadlocal]
93 MODULE_CODE_GLOBALVAR
= 7,
95 // FUNCTION: [type, callingconv, isproto, linkage, paramattrs, alignment,
96 // section, visibility, gc, unnamed_addr]
97 MODULE_CODE_FUNCTION
= 8,
99 // ALIAS: [alias type, aliasee val#, linkage, visibility]
100 MODULE_CODE_ALIAS_OLD
= 9,
102 MODULE_CODE_GCNAME
= 11, // GCNAME: [strchr x N]
103 MODULE_CODE_COMDAT
= 12, // COMDAT: [selection_kind, name]
105 MODULE_CODE_VSTOFFSET
= 13, // VSTOFFSET: [offset]
107 // ALIAS: [alias value type, addrspace, aliasee val#, linkage, visibility]
108 MODULE_CODE_ALIAS
= 14,
110 MODULE_CODE_METADATA_VALUES_UNUSED
= 15,
112 // SOURCE_FILENAME: [namechar x N]
113 MODULE_CODE_SOURCE_FILENAME
= 16,
116 MODULE_CODE_HASH
= 17,
118 // IFUNC: [ifunc value type, addrspace, resolver val#, linkage, visibility]
119 MODULE_CODE_IFUNC
= 18,
122 /// PARAMATTR blocks have code for defining a parameter attribute set.
123 enum AttributeCodes
{
124 // FIXME: Remove `PARAMATTR_CODE_ENTRY_OLD' in 4.0
125 PARAMATTR_CODE_ENTRY_OLD
= 1, // ENTRY: [paramidx0, attr0,
126 // paramidx1, attr1...]
127 PARAMATTR_CODE_ENTRY
= 2, // ENTRY: [attrgrp0, attrgrp1, ...]
128 PARAMATTR_GRP_CODE_ENTRY
= 3 // ENTRY: [grpid, idx, attr0, attr1, ...]
131 /// TYPE blocks have codes for each type primitive they use.
133 TYPE_CODE_NUMENTRY
= 1, // NUMENTRY: [numentries]
136 TYPE_CODE_VOID
= 2, // VOID
137 TYPE_CODE_FLOAT
= 3, // FLOAT
138 TYPE_CODE_DOUBLE
= 4, // DOUBLE
139 TYPE_CODE_LABEL
= 5, // LABEL
140 TYPE_CODE_OPAQUE
= 6, // OPAQUE
141 TYPE_CODE_INTEGER
= 7, // INTEGER: [width]
142 TYPE_CODE_POINTER
= 8, // POINTER: [pointee type]
144 TYPE_CODE_FUNCTION_OLD
= 9, // FUNCTION: [vararg, attrid, retty,
147 TYPE_CODE_HALF
= 10, // HALF
149 TYPE_CODE_ARRAY
= 11, // ARRAY: [numelts, eltty]
150 TYPE_CODE_VECTOR
= 12, // VECTOR: [numelts, eltty]
152 // These are not with the other floating point types because they're
153 // a late addition, and putting them in the right place breaks
154 // binary compatibility.
155 TYPE_CODE_X86_FP80
= 13, // X86 LONG DOUBLE
156 TYPE_CODE_FP128
= 14, // LONG DOUBLE (112 bit mantissa)
157 TYPE_CODE_PPC_FP128
= 15, // PPC LONG DOUBLE (2 doubles)
159 TYPE_CODE_METADATA
= 16, // METADATA
161 TYPE_CODE_X86_MMX
= 17, // X86 MMX
163 TYPE_CODE_STRUCT_ANON
= 18, // STRUCT_ANON: [ispacked, eltty x N]
164 TYPE_CODE_STRUCT_NAME
= 19, // STRUCT_NAME: [strchr x N]
165 TYPE_CODE_STRUCT_NAMED
= 20, // STRUCT_NAMED: [ispacked, eltty x N]
167 TYPE_CODE_FUNCTION
= 21, // FUNCTION: [vararg, retty, paramty x N]
169 TYPE_CODE_TOKEN
= 22 // TOKEN
172 enum OperandBundleTagCode
{
173 OPERAND_BUNDLE_TAG
= 1, // TAG: [strchr x N]
176 enum SyncScopeNameCode
{
180 // Value symbol table codes.
181 enum ValueSymtabCodes
{
182 VST_CODE_ENTRY
= 1, // VST_ENTRY: [valueid, namechar x N]
183 VST_CODE_BBENTRY
= 2, // VST_BBENTRY: [bbid, namechar x N]
184 VST_CODE_FNENTRY
= 3, // VST_FNENTRY: [valueid, offset, namechar x N]
185 // VST_COMBINED_ENTRY: [valueid, refguid]
186 VST_CODE_COMBINED_ENTRY
= 5
189 // The module path symbol table only has one code (MST_CODE_ENTRY).
190 enum ModulePathSymtabCodes
{
191 MST_CODE_ENTRY
= 1, // MST_ENTRY: [modid, namechar x N]
192 MST_CODE_HASH
= 2, // MST_HASH: [5*i32]
195 // The summary section uses different codes in the per-module
196 // and combined index cases.
197 enum GlobalValueSummarySymtabCodes
{
198 // PERMODULE: [valueid, flags, instcount, numrefs, numrefs x valueid,
201 // PERMODULE_PROFILE: [valueid, flags, instcount, numrefs,
202 // numrefs x valueid,
203 // n x (valueid, hotness)]
204 FS_PERMODULE_PROFILE
= 2,
205 // PERMODULE_GLOBALVAR_INIT_REFS: [valueid, flags, n x valueid]
206 FS_PERMODULE_GLOBALVAR_INIT_REFS
= 3,
207 // COMBINED: [valueid, modid, flags, instcount, numrefs, numrefs x valueid,
210 // COMBINED_PROFILE: [valueid, modid, flags, instcount, numrefs,
211 // numrefs x valueid,
212 // n x (valueid, hotness)]
213 FS_COMBINED_PROFILE
= 5,
214 // COMBINED_GLOBALVAR_INIT_REFS: [valueid, modid, flags, n x valueid]
215 FS_COMBINED_GLOBALVAR_INIT_REFS
= 6,
216 // ALIAS: [valueid, flags, valueid]
218 // COMBINED_ALIAS: [valueid, modid, flags, valueid]
219 FS_COMBINED_ALIAS
= 8,
220 // COMBINED_ORIGINAL_NAME: [original_name_hash]
221 FS_COMBINED_ORIGINAL_NAME
= 9,
222 // VERSION of the summary, bumped when adding flags for instance.
224 // The list of llvm.type.test type identifiers used by the following function
225 // that are used other than by an llvm.assume.
228 // The list of virtual calls made by this function using
229 // llvm.assume(llvm.type.test) intrinsics that do not have all constant
230 // integer arguments.
231 // [n x (typeid, offset)]
232 FS_TYPE_TEST_ASSUME_VCALLS
= 12,
233 // The list of virtual calls made by this function using
234 // llvm.type.checked.load intrinsics that do not have all constant integer
236 // [n x (typeid, offset)]
237 FS_TYPE_CHECKED_LOAD_VCALLS
= 13,
238 // Identifies a virtual call made by this function using an
239 // llvm.assume(llvm.type.test) intrinsic with all constant integer arguments.
240 // [typeid, offset, n x arg]
241 FS_TYPE_TEST_ASSUME_CONST_VCALL
= 14,
242 // Identifies a virtual call made by this function using an
243 // llvm.type.checked.load intrinsic with all constant integer arguments.
244 // [typeid, offset, n x arg]
245 FS_TYPE_CHECKED_LOAD_CONST_VCALL
= 15,
246 // Assigns a GUID to a value ID. This normally appears only in combined
247 // summaries, but it can also appear in per-module summaries for PGO data.
250 // The list of local functions with CFI jump tables. Function names are
251 // strings in strtab.
253 FS_CFI_FUNCTION_DEFS
= 17,
254 // The list of external functions with CFI jump tables. Function names are
255 // strings in strtab.
257 FS_CFI_FUNCTION_DECLS
= 18,
258 // Per-module summary that also adds relative block frequency to callee info.
259 // PERMODULE_RELBF: [valueid, flags, instcount, numrefs,
260 // numrefs x valueid,
261 // n x (valueid, relblockfreq)]
262 FS_PERMODULE_RELBF
= 19,
265 // Maps type identifier to summary information for that type identifier.
266 // Produced by the thin link (only lives in combined index).
267 // TYPE_ID: [typeid, kind, bitwidth, align, size, bitmask, inlinebits,
268 // n x (typeid, kind, name, numrba,
269 // numrba x (numarg, numarg x arg, kind, info, byte, bit))]
271 // For background see overview at https://llvm.org/docs/TypeMetadata.html.
272 // The type metadata includes both the type identifier and the offset of
273 // the address point of the type (the address held by objects of that type
274 // which may not be the beginning of the virtual table). Vtable definitions
275 // are decorated with type metadata for the types they are compatible with.
277 // Maps type identifier to summary information for that type identifier
278 // computed from type metadata: the valueid of each vtable definition
279 // decorated with a type metadata for that identifier, and the offset from
280 // the corresponding type metadata.
281 // Exists in the per-module summary to provide information to thin link
282 // for index-based whole program devirtualization.
283 // TYPE_ID_METADATA: [typeid, n x (valueid, offset)]
284 FS_TYPE_ID_METADATA
= 22,
285 // Summarizes vtable definition for use in index-based whole program
286 // devirtualization during the thin link.
287 // PERMODULE_VTABLE_GLOBALVAR_INIT_REFS: [valueid, flags, varflags,
288 // numrefs, numrefs x valueid,
289 // n x (valueid, offset)]
290 FS_PERMODULE_VTABLE_GLOBALVAR_INIT_REFS
= 23,
294 METADATA_STRING_OLD
= 1, // MDSTRING: [values]
295 METADATA_VALUE
= 2, // VALUE: [type num, value num]
296 METADATA_NODE
= 3, // NODE: [n x md num]
297 METADATA_NAME
= 4, // STRING: [values]
298 METADATA_DISTINCT_NODE
= 5, // DISTINCT_NODE: [n x md num]
299 METADATA_KIND
= 6, // [n x [id, name]]
300 METADATA_LOCATION
= 7, // [distinct, line, col, scope, inlined-at?]
301 METADATA_OLD_NODE
= 8, // OLD_NODE: [n x (type num, value num)]
302 METADATA_OLD_FN_NODE
= 9, // OLD_FN_NODE: [n x (type num, value num)]
303 METADATA_NAMED_NODE
= 10, // NAMED_NODE: [n x mdnodes]
304 METADATA_ATTACHMENT
= 11, // [m x [value, [n x [id, mdnode]]]
305 METADATA_GENERIC_DEBUG
= 12, // [distinct, tag, vers, header, n x md num]
306 METADATA_SUBRANGE
= 13, // [distinct, count, lo]
307 METADATA_ENUMERATOR
= 14, // [isUnsigned|distinct, value, name]
308 METADATA_BASIC_TYPE
= 15, // [distinct, tag, name, size, align, enc]
309 METADATA_FILE
= 16, // [distinct, filename, directory, checksumkind, checksum]
310 METADATA_DERIVED_TYPE
= 17, // [distinct, ...]
311 METADATA_COMPOSITE_TYPE
= 18, // [distinct, ...]
312 METADATA_SUBROUTINE_TYPE
= 19, // [distinct, flags, types, cc]
313 METADATA_COMPILE_UNIT
= 20, // [distinct, ...]
314 METADATA_SUBPROGRAM
= 21, // [distinct, ...]
315 METADATA_LEXICAL_BLOCK
= 22, // [distinct, scope, file, line, column]
316 METADATA_LEXICAL_BLOCK_FILE
= 23, //[distinct, scope, file, discriminator]
317 METADATA_NAMESPACE
= 24, // [distinct, scope, file, name, line, exportSymbols]
318 METADATA_TEMPLATE_TYPE
= 25, // [distinct, scope, name, type, ...]
319 METADATA_TEMPLATE_VALUE
= 26, // [distinct, scope, name, type, value, ...]
320 METADATA_GLOBAL_VAR
= 27, // [distinct, ...]
321 METADATA_LOCAL_VAR
= 28, // [distinct, ...]
322 METADATA_EXPRESSION
= 29, // [distinct, n x element]
323 METADATA_OBJC_PROPERTY
= 30, // [distinct, name, file, line, ...]
324 METADATA_IMPORTED_ENTITY
= 31, // [distinct, tag, scope, entity, line, name]
325 METADATA_MODULE
= 32, // [distinct, scope, name, ...]
326 METADATA_MACRO
= 33, // [distinct, macinfo, line, name, value]
327 METADATA_MACRO_FILE
= 34, // [distinct, macinfo, line, file, ...]
328 METADATA_STRINGS
= 35, // [count, offset] blob([lengths][chars])
329 METADATA_GLOBAL_DECL_ATTACHMENT
= 36, // [valueid, n x [id, mdnode]]
330 METADATA_GLOBAL_VAR_EXPR
= 37, // [distinct, var, expr]
331 METADATA_INDEX_OFFSET
= 38, // [offset]
332 METADATA_INDEX
= 39, // [bitpos]
333 METADATA_LABEL
= 40, // [distinct, scope, name, file, line]
334 METADATA_COMMON_BLOCK
= 44, // [distinct, scope, name, variable,...]
337 // The constants block (CONSTANTS_BLOCK_ID) describes emission for each
338 // constant and maintains an implicit current type value.
339 enum ConstantsCodes
{
340 CST_CODE_SETTYPE
= 1, // SETTYPE: [typeid]
341 CST_CODE_NULL
= 2, // NULL
342 CST_CODE_UNDEF
= 3, // UNDEF
343 CST_CODE_INTEGER
= 4, // INTEGER: [intval]
344 CST_CODE_WIDE_INTEGER
= 5, // WIDE_INTEGER: [n x intval]
345 CST_CODE_FLOAT
= 6, // FLOAT: [fpval]
346 CST_CODE_AGGREGATE
= 7, // AGGREGATE: [n x value number]
347 CST_CODE_STRING
= 8, // STRING: [values]
348 CST_CODE_CSTRING
= 9, // CSTRING: [values]
349 CST_CODE_CE_BINOP
= 10, // CE_BINOP: [opcode, opval, opval]
350 CST_CODE_CE_CAST
= 11, // CE_CAST: [opcode, opty, opval]
351 CST_CODE_CE_GEP
= 12, // CE_GEP: [n x operands]
352 CST_CODE_CE_SELECT
= 13, // CE_SELECT: [opval, opval, opval]
353 CST_CODE_CE_EXTRACTELT
= 14, // CE_EXTRACTELT: [opty, opval, opval]
354 CST_CODE_CE_INSERTELT
= 15, // CE_INSERTELT: [opval, opval, opval]
355 CST_CODE_CE_SHUFFLEVEC
= 16, // CE_SHUFFLEVEC: [opval, opval, opval]
356 CST_CODE_CE_CMP
= 17, // CE_CMP: [opty, opval, opval, pred]
357 CST_CODE_INLINEASM_OLD
= 18, // INLINEASM: [sideeffect|alignstack,
359 CST_CODE_CE_SHUFVEC_EX
= 19, // SHUFVEC_EX: [opty, opval, opval, opval]
360 CST_CODE_CE_INBOUNDS_GEP
= 20, // INBOUNDS_GEP: [n x operands]
361 CST_CODE_BLOCKADDRESS
= 21, // CST_CODE_BLOCKADDRESS [fnty, fnval, bb#]
362 CST_CODE_DATA
= 22, // DATA: [n x elements]
363 CST_CODE_INLINEASM
= 23, // INLINEASM: [sideeffect|alignstack|
364 // asmdialect,asmstr,conststr]
365 CST_CODE_CE_GEP_WITH_INRANGE_INDEX
= 24, // [opty, flags, n x operands]
366 CST_CODE_CE_UNOP
= 25, // CE_UNOP: [opcode, opval]
369 /// CastOpcodes - These are values used in the bitcode files to encode which
370 /// cast a CST_CODE_CE_CAST or a XXX refers to. The values of these enums
371 /// have no fixed relation to the LLVM IR enum values. Changing these will
372 /// break compatibility with old files.
386 CAST_ADDRSPACECAST
= 12
389 /// UnaryOpcodes - These are values used in the bitcode files to encode which
390 /// unop a CST_CODE_CE_UNOP or a XXX refers to. The values of these enums
391 /// have no fixed relation to the LLVM IR enum values. Changing these will
392 /// break compatibility with old files.
397 /// BinaryOpcodes - These are values used in the bitcode files to encode which
398 /// binop a CST_CODE_CE_BINOP or a XXX refers to. The values of these enums
399 /// have no fixed relation to the LLVM IR enum values. Changing these will
400 /// break compatibility with old files.
406 BINOP_SDIV
= 4, // overloaded for FP
408 BINOP_SREM
= 6, // overloaded for FP
417 /// These are values used in the bitcode files to encode AtomicRMW operations.
418 /// The values of these enums have no fixed relation to the LLVM IR enum
419 /// values. Changing these will break compatibility with old files.
436 /// OverflowingBinaryOperatorOptionalFlags - Flags for serializing
437 /// OverflowingBinaryOperator's SubclassOptionalData contents.
438 enum OverflowingBinaryOperatorOptionalFlags
{
439 OBO_NO_UNSIGNED_WRAP
= 0,
440 OBO_NO_SIGNED_WRAP
= 1
444 /// This is a fixed layout derived from the bitcode emitted by LLVM 5.0
445 /// intended to decouple the in-memory representation from the serialization.
447 UnsafeAlgebra
= (1 << 0), // Legacy
450 NoSignedZeros
= (1 << 3),
451 AllowReciprocal
= (1 << 4),
452 AllowContract
= (1 << 5),
453 ApproxFunc
= (1 << 6),
454 AllowReassoc
= (1 << 7)
457 /// PossiblyExactOperatorOptionalFlags - Flags for serializing
458 /// PossiblyExactOperator's SubclassOptionalData contents.
459 enum PossiblyExactOperatorOptionalFlags
{ PEO_EXACT
= 0 };
461 /// Encoded AtomicOrdering values.
462 enum AtomicOrderingCodes
{
463 ORDERING_NOTATOMIC
= 0,
464 ORDERING_UNORDERED
= 1,
465 ORDERING_MONOTONIC
= 2,
466 ORDERING_ACQUIRE
= 3,
467 ORDERING_RELEASE
= 4,
472 /// Markers and flags for call instruction.
473 enum CallMarkersFlags
{
477 CALL_EXPLICIT_TYPE
= 15,
479 CALL_FMF
= 17 // Call has optional fast-math-flags.
482 // The function body block (FUNCTION_BLOCK_ID) describes function bodies. It
483 // can contain a constant block (CONSTANTS_BLOCK_ID).
485 FUNC_CODE_DECLAREBLOCKS
= 1, // DECLAREBLOCKS: [n]
487 FUNC_CODE_INST_BINOP
= 2, // BINOP: [opcode, ty, opval, opval]
488 FUNC_CODE_INST_CAST
= 3, // CAST: [opcode, ty, opty, opval]
489 FUNC_CODE_INST_GEP_OLD
= 4, // GEP: [n x operands]
490 FUNC_CODE_INST_SELECT
= 5, // SELECT: [ty, opval, opval, opval]
491 FUNC_CODE_INST_EXTRACTELT
= 6, // EXTRACTELT: [opty, opval, opval]
492 FUNC_CODE_INST_INSERTELT
= 7, // INSERTELT: [ty, opval, opval, opval]
493 FUNC_CODE_INST_SHUFFLEVEC
= 8, // SHUFFLEVEC: [ty, opval, opval, opval]
494 FUNC_CODE_INST_CMP
= 9, // CMP: [opty, opval, opval, pred]
496 FUNC_CODE_INST_RET
= 10, // RET: [opty,opval<both optional>]
497 FUNC_CODE_INST_BR
= 11, // BR: [bb#, bb#, cond] or [bb#]
498 FUNC_CODE_INST_SWITCH
= 12, // SWITCH: [opty, op0, op1, ...]
499 FUNC_CODE_INST_INVOKE
= 13, // INVOKE: [attr, fnty, op0,op1, ...]
501 FUNC_CODE_INST_UNREACHABLE
= 15, // UNREACHABLE
503 FUNC_CODE_INST_PHI
= 16, // PHI: [ty, val0,bb0, ...]
506 FUNC_CODE_INST_ALLOCA
= 19, // ALLOCA: [instty, opty, op, align]
507 FUNC_CODE_INST_LOAD
= 20, // LOAD: [opty, op, align, vol]
510 FUNC_CODE_INST_VAARG
= 23, // VAARG: [valistty, valist, instty]
511 // This store code encodes the pointer type, rather than the value type
512 // this is so information only available in the pointer type (e.g. address
513 // spaces) is retained.
514 FUNC_CODE_INST_STORE_OLD
= 24, // STORE: [ptrty,ptr,val, align, vol]
516 FUNC_CODE_INST_EXTRACTVAL
= 26, // EXTRACTVAL: [n x operands]
517 FUNC_CODE_INST_INSERTVAL
= 27, // INSERTVAL: [n x operands]
518 // fcmp/icmp returning Int1TY or vector of Int1Ty. Same as CMP, exists to
519 // support legacy vicmp/vfcmp instructions.
520 FUNC_CODE_INST_CMP2
= 28, // CMP2: [opty, opval, opval, pred]
521 // new select on i1 or [N x i1]
522 FUNC_CODE_INST_VSELECT
= 29, // VSELECT: [ty,opval,opval,predty,pred]
523 FUNC_CODE_INST_INBOUNDS_GEP_OLD
= 30, // INBOUNDS_GEP: [n x operands]
524 FUNC_CODE_INST_INDIRECTBR
= 31, // INDIRECTBR: [opty, op0, op1, ...]
526 FUNC_CODE_DEBUG_LOC_AGAIN
= 33, // DEBUG_LOC_AGAIN
528 FUNC_CODE_INST_CALL
= 34, // CALL: [attr, cc, fnty, fnid, args...]
530 FUNC_CODE_DEBUG_LOC
= 35, // DEBUG_LOC: [Line,Col,ScopeVal, IAVal]
531 FUNC_CODE_INST_FENCE
= 36, // FENCE: [ordering, synchscope]
532 FUNC_CODE_INST_CMPXCHG_OLD
= 37, // CMPXCHG: [ptrty,ptr,cmp,new, align, vol,
533 // ordering, synchscope]
534 FUNC_CODE_INST_ATOMICRMW
= 38, // ATOMICRMW: [ptrty,ptr,val, operation,
536 // ordering, synchscope]
537 FUNC_CODE_INST_RESUME
= 39, // RESUME: [opval]
538 FUNC_CODE_INST_LANDINGPAD_OLD
=
539 40, // LANDINGPAD: [ty,val,val,num,id0,val0...]
540 FUNC_CODE_INST_LOADATOMIC
= 41, // LOAD: [opty, op, align, vol,
541 // ordering, synchscope]
542 FUNC_CODE_INST_STOREATOMIC_OLD
= 42, // STORE: [ptrty,ptr,val, align, vol
543 // ordering, synchscope]
544 FUNC_CODE_INST_GEP
= 43, // GEP: [inbounds, n x operands]
545 FUNC_CODE_INST_STORE
= 44, // STORE: [ptrty,ptr,valty,val, align, vol]
546 FUNC_CODE_INST_STOREATOMIC
= 45, // STORE: [ptrty,ptr,val, align, vol
547 FUNC_CODE_INST_CMPXCHG
= 46, // CMPXCHG: [ptrty,ptr,valty,cmp,new, align,
548 // vol,ordering,synchscope]
549 FUNC_CODE_INST_LANDINGPAD
= 47, // LANDINGPAD: [ty,val,num,id0,val0...]
550 FUNC_CODE_INST_CLEANUPRET
= 48, // CLEANUPRET: [val] or [val,bb#]
551 FUNC_CODE_INST_CATCHRET
= 49, // CATCHRET: [val,bb#]
552 FUNC_CODE_INST_CATCHPAD
= 50, // CATCHPAD: [bb#,bb#,num,args...]
553 FUNC_CODE_INST_CLEANUPPAD
= 51, // CLEANUPPAD: [num,args...]
554 FUNC_CODE_INST_CATCHSWITCH
=
555 52, // CATCHSWITCH: [num,args...] or [num,args...,bb]
558 FUNC_CODE_OPERAND_BUNDLE
= 55, // OPERAND_BUNDLE: [tag#, value...]
559 FUNC_CODE_INST_UNOP
= 56, // UNOP: [opcode, ty, opval]
560 FUNC_CODE_INST_CALLBR
= 57, // CALLBR: [attr, cc, norm, transfs,
561 // fnty, fnid, args...]
565 USELIST_CODE_DEFAULT
= 1, // DEFAULT: [index..., value-id]
566 USELIST_CODE_BB
= 2 // BB: [index..., bb-id]
569 enum AttributeKindCodes
{
571 ATTR_KIND_ALIGNMENT
= 1,
572 ATTR_KIND_ALWAYS_INLINE
= 2,
573 ATTR_KIND_BY_VAL
= 3,
574 ATTR_KIND_INLINE_HINT
= 4,
575 ATTR_KIND_IN_REG
= 5,
576 ATTR_KIND_MIN_SIZE
= 6,
579 ATTR_KIND_NO_ALIAS
= 9,
580 ATTR_KIND_NO_BUILTIN
= 10,
581 ATTR_KIND_NO_CAPTURE
= 11,
582 ATTR_KIND_NO_DUPLICATE
= 12,
583 ATTR_KIND_NO_IMPLICIT_FLOAT
= 13,
584 ATTR_KIND_NO_INLINE
= 14,
585 ATTR_KIND_NON_LAZY_BIND
= 15,
586 ATTR_KIND_NO_RED_ZONE
= 16,
587 ATTR_KIND_NO_RETURN
= 17,
588 ATTR_KIND_NO_UNWIND
= 18,
589 ATTR_KIND_OPTIMIZE_FOR_SIZE
= 19,
590 ATTR_KIND_READ_NONE
= 20,
591 ATTR_KIND_READ_ONLY
= 21,
592 ATTR_KIND_RETURNED
= 22,
593 ATTR_KIND_RETURNS_TWICE
= 23,
594 ATTR_KIND_S_EXT
= 24,
595 ATTR_KIND_STACK_ALIGNMENT
= 25,
596 ATTR_KIND_STACK_PROTECT
= 26,
597 ATTR_KIND_STACK_PROTECT_REQ
= 27,
598 ATTR_KIND_STACK_PROTECT_STRONG
= 28,
599 ATTR_KIND_STRUCT_RET
= 29,
600 ATTR_KIND_SANITIZE_ADDRESS
= 30,
601 ATTR_KIND_SANITIZE_THREAD
= 31,
602 ATTR_KIND_SANITIZE_MEMORY
= 32,
603 ATTR_KIND_UW_TABLE
= 33,
604 ATTR_KIND_Z_EXT
= 34,
605 ATTR_KIND_BUILTIN
= 35,
607 ATTR_KIND_OPTIMIZE_NONE
= 37,
608 ATTR_KIND_IN_ALLOCA
= 38,
609 ATTR_KIND_NON_NULL
= 39,
610 ATTR_KIND_JUMP_TABLE
= 40,
611 ATTR_KIND_DEREFERENCEABLE
= 41,
612 ATTR_KIND_DEREFERENCEABLE_OR_NULL
= 42,
613 ATTR_KIND_CONVERGENT
= 43,
614 ATTR_KIND_SAFESTACK
= 44,
615 ATTR_KIND_ARGMEMONLY
= 45,
616 ATTR_KIND_SWIFT_SELF
= 46,
617 ATTR_KIND_SWIFT_ERROR
= 47,
618 ATTR_KIND_NO_RECURSE
= 48,
619 ATTR_KIND_INACCESSIBLEMEM_ONLY
= 49,
620 ATTR_KIND_INACCESSIBLEMEM_OR_ARGMEMONLY
= 50,
621 ATTR_KIND_ALLOC_SIZE
= 51,
622 ATTR_KIND_WRITEONLY
= 52,
623 ATTR_KIND_SPECULATABLE
= 53,
624 ATTR_KIND_STRICT_FP
= 54,
625 ATTR_KIND_SANITIZE_HWADDRESS
= 55,
626 ATTR_KIND_NOCF_CHECK
= 56,
627 ATTR_KIND_OPT_FOR_FUZZING
= 57,
628 ATTR_KIND_SHADOWCALLSTACK
= 58,
629 ATTR_KIND_SPECULATIVE_LOAD_HARDENING
= 59,
630 ATTR_KIND_IMMARG
= 60,
631 ATTR_KIND_WILLRETURN
= 61,
632 ATTR_KIND_NOFREE
= 62,
633 ATTR_KIND_NOSYNC
= 63,
634 ATTR_KIND_SANITIZE_MEMTAG
= 64,
637 enum ComdatSelectionKindCodes
{
638 COMDAT_SELECTION_KIND_ANY
= 1,
639 COMDAT_SELECTION_KIND_EXACT_MATCH
= 2,
640 COMDAT_SELECTION_KIND_LARGEST
= 3,
641 COMDAT_SELECTION_KIND_NO_DUPLICATES
= 4,
642 COMDAT_SELECTION_KIND_SAME_SIZE
= 5,
653 } // End bitc namespace
654 } // End llvm namespace