LLVM 23.0.0git
LLVMBitCodes.h
Go to the documentation of this file.
1//===- LLVMBitCodes.h - Enum values for the LLVM bitcode format -*- C++ -*-===//
2//
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
6//
7//===----------------------------------------------------------------------===//
8//
9// This header defines Bitcode enum values for LLVM IR bitcode files.
10//
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
13// respective lists.
14//
15//===----------------------------------------------------------------------===//
16
17#ifndef LLVM_BITCODE_LLVMBITCODES_H
18#define LLVM_BITCODE_LLVMBITCODES_H
19
20// This is the only file included, and it, in turn, is a leaf header.
21// This allows external tools to dump the AST of this file and analyze it for
22// changes without needing to fully or partially build LLVM itself.
24
25namespace llvm {
26namespace bitc {
27// The only top-level block types are MODULE, IDENTIFICATION, STRTAB and SYMTAB.
67
68/// Identification block contains a string that describes the producer details,
69/// and an epoch that defines the auto-upgrade capability.
71 IDENTIFICATION_CODE_STRING = 1, // IDENTIFICATION: [strchr x N]
72 IDENTIFICATION_CODE_EPOCH = 2, // EPOCH: [epoch#]
73};
74
75/// The epoch that defines the auto-upgrade compatibility for the bitcode.
76///
77/// LLVM guarantees in a major release that a minor release can read bitcode
78/// generated by previous minor releases. We translate this by making the reader
79/// accepting only bitcode with the same epoch, except for the X.0 release which
80/// also accepts N-1.
82
83/// MODULE blocks have a number of optional fields and subblocks.
85 MODULE_CODE_VERSION = 1, // VERSION: [version#]
86 MODULE_CODE_TRIPLE = 2, // TRIPLE: [strchr x N]
87 MODULE_CODE_DATALAYOUT = 3, // DATALAYOUT: [strchr x N]
88 MODULE_CODE_ASM = 4, // ASM: [strchr x N]
89 MODULE_CODE_SECTIONNAME = 5, // SECTIONNAME: [strchr x N]
90
91 // Deprecated, but still needed to read old bitcode files.
92 MODULE_CODE_DEPLIB = 6, // DEPLIB: [strchr x N]
93
94 // GLOBALVAR: [pointer type, isconst, initid,
95 // linkage, alignment, section, visibility, threadlocal]
97
98 // FUNCTION: [type, callingconv, isproto, linkage, paramattrs, alignment,
99 // section, visibility, gc, unnamed_addr]
101
102 // ALIAS: [alias type, aliasee val#, linkage, visibility]
104
105 MODULE_CODE_GCNAME = 11, // GCNAME: [strchr x N]
106 MODULE_CODE_COMDAT = 12, // COMDAT: [selection_kind, name]
107
108 MODULE_CODE_VSTOFFSET = 13, // VSTOFFSET: [offset]
109
110 // ALIAS: [alias value type, addrspace, aliasee val#, linkage, visibility]
112
114
115 // SOURCE_FILENAME: [namechar x N]
117
118 // HASH: [5*i32]
120
121 // IFUNC: [ifunc value type, addrspace, resolver val#, linkage, visibility]
123
124 // GUIDLIST: [n x i64]
126};
127
128/// PARAMATTR blocks have code for defining a parameter attribute set.
130 // Deprecated, but still needed to read old bitcode files.
131 PARAMATTR_CODE_ENTRY_OLD = 1, // ENTRY: [paramidx0, attr0,
132 // paramidx1, attr1...]
133 PARAMATTR_CODE_ENTRY = 2, // ENTRY: [attrgrp0, attrgrp1, ...]
134 PARAMATTR_GRP_CODE_ENTRY = 3 // ENTRY: [grpid, idx, attr0, attr1, ...]
135};
136
137/// TYPE blocks have codes for each type primitive they use.
139 TYPE_CODE_NUMENTRY = 1, // NUMENTRY: [numentries]
140
141 // Type Codes
142 TYPE_CODE_VOID = 2, // VOID
143 TYPE_CODE_FLOAT = 3, // FLOAT
144 TYPE_CODE_DOUBLE = 4, // DOUBLE
145 TYPE_CODE_LABEL = 5, // LABEL
146 TYPE_CODE_OPAQUE = 6, // OPAQUE
147 TYPE_CODE_INTEGER = 7, // INTEGER: [width]
148 TYPE_CODE_POINTER = 8, // POINTER: [pointee type]
149
150 TYPE_CODE_FUNCTION_OLD = 9, // FUNCTION: [vararg, attrid, retty,
151 // paramty x N]
152
153 TYPE_CODE_HALF = 10, // HALF
154
155 TYPE_CODE_ARRAY = 11, // ARRAY: [numelts, eltty]
156 TYPE_CODE_VECTOR = 12, // VECTOR: [numelts, eltty]
157
158 // These are not with the other floating point types because they're
159 // a late addition, and putting them in the right place breaks
160 // binary compatibility.
161 TYPE_CODE_X86_FP80 = 13, // X86 LONG DOUBLE
162 TYPE_CODE_FP128 = 14, // LONG DOUBLE (112 bit mantissa)
163 TYPE_CODE_PPC_FP128 = 15, // PPC LONG DOUBLE (2 doubles)
164
165 TYPE_CODE_METADATA = 16, // METADATA
166
167 TYPE_CODE_X86_MMX = 17, // X86 MMX
168
169 TYPE_CODE_STRUCT_ANON = 18, // STRUCT_ANON: [ispacked, eltty x N]
170 TYPE_CODE_STRUCT_NAME = 19, // STRUCT_NAME: [strchr x N]
171 TYPE_CODE_STRUCT_NAMED = 20, // STRUCT_NAMED: [ispacked, eltty x N]
172
173 TYPE_CODE_FUNCTION = 21, // FUNCTION: [vararg, retty, paramty x N]
174
175 TYPE_CODE_TOKEN = 22, // TOKEN
176
177 TYPE_CODE_BFLOAT = 23, // BRAIN FLOATING POINT
178 TYPE_CODE_X86_AMX = 24, // X86 AMX
179
180 TYPE_CODE_OPAQUE_POINTER = 25, // OPAQUE_POINTER: [addrspace]
181
182 TYPE_CODE_TARGET_TYPE = 26, // TARGET_TYPE
183
184 TYPE_CODE_BYTE = 27, // BYTE: [width]
185};
186
188 OPERAND_BUNDLE_TAG = 1, // TAG: [strchr x N]
189};
190
194
195// Value symbol table codes.
197 VST_CODE_ENTRY = 1, // VST_ENTRY: [valueid, namechar x N]
198 VST_CODE_BBENTRY = 2, // VST_BBENTRY: [bbid, namechar x N]
199 VST_CODE_FNENTRY = 3, // VST_FNENTRY: [valueid, offset, namechar x N]
200 // VST_COMBINED_ENTRY: [valueid, refguid]
202};
203
204// The module path symbol table only has one code (MST_CODE_ENTRY).
206 MST_CODE_ENTRY = 1, // MST_ENTRY: [modid, namechar x N]
207 MST_CODE_HASH = 2, // MST_HASH: [5*i32]
208};
209
210// The summary section uses different codes in the per-module
211// and combined index cases.
213 // PERMODULE: [valueid, flags, instcount, numrefs, numrefs x valueid,
214 // n x (valueid)]
216 // PERMODULE_PROFILE: [valueid, flags, instcount, numrefs,
217 // numrefs x valueid,
218 // n x (valueid, hotness+tailcall)]
220 // PERMODULE_GLOBALVAR_INIT_REFS: [valueid, flags, n x valueid]
222 // COMBINED: [valueid, modid, flags, instcount, numrefs, numrefs x valueid,
223 // n x (valueid)]
225 // COMBINED_PROFILE: [valueid, modid, flags, instcount, numrefs,
226 // numrefs x valueid,
227 // n x (valueid, hotness+tailcall)]
229 // COMBINED_GLOBALVAR_INIT_REFS: [valueid, modid, flags, n x valueid]
231 // ALIAS: [valueid, flags, valueid]
233 // COMBINED_ALIAS: [valueid, modid, flags, valueid]
235 // COMBINED_ORIGINAL_NAME: [original_name_hash]
237 // VERSION of the summary, bumped when adding flags for instance.
239 // The list of llvm.type.test type identifiers used by the following function
240 // that are used other than by an llvm.assume.
241 // [n x typeid]
243 // The list of virtual calls made by this function using
244 // llvm.assume(llvm.type.test) intrinsics that do not have all constant
245 // integer arguments.
246 // [n x (typeid, offset)]
248 // The list of virtual calls made by this function using
249 // llvm.type.checked.load intrinsics that do not have all constant integer
250 // arguments.
251 // [n x (typeid, offset)]
253 // Identifies a virtual call made by this function using an
254 // llvm.assume(llvm.type.test) intrinsic with all constant integer arguments.
255 // [typeid, offset, n x arg]
257 // Identifies a virtual call made by this function using an
258 // llvm.type.checked.load intrinsic with all constant integer arguments.
259 // [typeid, offset, n x arg]
261 // Assigns a GUID to a value ID. This normally appears only in combined
262 // summaries, but it can also appear in per-module summaries for PGO data.
263 // [valueid, guid]
265 // The list of local functions with CFI jump tables. Function names are
266 // strings in strtab.
267 // [n * name]
269 // The list of external functions with CFI jump tables. Function names are
270 // strings in strtab.
271 // [n * name]
273 // Deprecated, but still needed to read old bitcode files.
274 // Per-module summary that also adds relative block frequency to callee info.
275 // PERMODULE_RELBF: [valueid, flags, instcount, numrefs,
276 // numrefs x valueid,
277 // n x (valueid, relblockfreq+tailcall)]
279 // Index-wide flags
281 // Maps type identifier to summary information for that type identifier.
282 // Produced by the thin link (only lives in combined index).
283 // TYPE_ID: [typeid, kind, bitwidth, align, size, bitmask, inlinebits,
284 // n x (typeid, kind, name, numrba,
285 // numrba x (numarg, numarg x arg, kind, info, byte, bit))]
287 // For background see overview at https://llvm.org/docs/TypeMetadata.html.
288 // The type metadata includes both the type identifier and the offset of
289 // the address point of the type (the address held by objects of that type
290 // which may not be the beginning of the virtual table). Vtable definitions
291 // are decorated with type metadata for the types they are compatible with.
292 //
293 // Maps type identifier to summary information for that type identifier
294 // computed from type metadata: the valueid of each vtable definition
295 // decorated with a type metadata for that identifier, and the offset from
296 // the corresponding type metadata.
297 // Exists in the per-module summary to provide information to thin link
298 // for index-based whole program devirtualization.
299 // TYPE_ID_METADATA: [typeid, n x (valueid, offset)]
301 // Summarizes vtable definition for use in index-based whole program
302 // devirtualization during the thin link.
303 // PERMODULE_VTABLE_GLOBALVAR_INIT_REFS: [valueid, flags, varflags,
304 // numrefs, numrefs x valueid,
305 // n x (valueid, offset)]
307 // The total number of basic blocks in the module.
309 // Range information for accessed offsets for every argument.
310 // [n x (paramno, range, numcalls, numcalls x (callee_guid, paramno, range))]
312 // Summary of per-module memprof callsite metadata.
313 // [valueid, n x stackidindex]
315 // Summary of per-module allocation memprof metadata.
316 // [nummib, nummib x (alloc type, context radix tree index),
317 // [nummib x (numcontext x total size)]?]
319 // Summary of combined index memprof callsite metadata.
320 // [valueid, numstackindices, numver,
321 // numstackindices x stackidindex, numver x version]
323 // Summary of combined index allocation memprof metadata.
324 // [nummib, numver,
325 // nummib x (alloc type, context radix tree index),
326 // numver x version]
328 // List of all stack ids referenced by index in the callsite and alloc infos.
329 // [n x stack id]
331 // List of all full stack id pairs corresponding to the total sizes recorded
332 // at the end of the alloc info when reporting of hinted bytes is enabled.
333 // We use a fixed-width array, which is more efficient as these ids typically
334 // are close to 64 bits in size. The max fixed width value supported is 32
335 // bits so each 64-bit context id hash is recorded as a pair (upper 32 bits
336 // first). This record must immediately precede the associated alloc info, and
337 // the entries must be in the exact same order as the corresponding sizes.
338 // [nummib x (numcontext x full stack id)]
340 // Linearized radix tree of allocation contexts. See the description above the
341 // CallStackRadixTreeBuilder class in ProfileData/MemProf.h for format.
342 // [n x entry]
344 // Summary of combined index allocation memprof metadata, without context.
345 // [nummib, numver,
346 // nummib x alloc type,
347 // numver x version]
349};
350
352 METADATA_STRING_OLD = 1, // MDSTRING: [values]
353 METADATA_VALUE = 2, // VALUE: [type num, value num]
354 METADATA_NODE = 3, // NODE: [n x md num]
355 METADATA_NAME = 4, // STRING: [values]
356 METADATA_DISTINCT_NODE = 5, // DISTINCT_NODE: [n x md num]
357 METADATA_KIND = 6, // [n x [id, name]]
358 METADATA_LOCATION = 7, // [distinct, line, col, scope, inlined-at?]
359 METADATA_OLD_NODE = 8, // OLD_NODE: [n x (type num, value num)]
360 METADATA_OLD_FN_NODE = 9, // OLD_FN_NODE: [n x (type num, value num)]
361 METADATA_NAMED_NODE = 10, // NAMED_NODE: [n x mdnodes]
362 METADATA_ATTACHMENT = 11, // [m x [value, [n x [id, mdnode]]]
363 METADATA_GENERIC_DEBUG = 12, // [distinct, tag, vers, header, n x md num]
364 METADATA_SUBRANGE = 13, // [distinct, count, lo]
365 METADATA_ENUMERATOR = 14, // [isUnsigned|distinct, value, name]
366 METADATA_BASIC_TYPE = 15, // [distinct, tag, name, size, align, enc]
367 METADATA_FILE = 16, // [distinct, filename, directory, checksumkind, checksum]
368 METADATA_DERIVED_TYPE = 17, // [distinct, ...]
369 METADATA_COMPOSITE_TYPE = 18, // [distinct, ...]
370 METADATA_SUBROUTINE_TYPE = 19, // [distinct, flags, types, cc]
371 METADATA_COMPILE_UNIT = 20, // [distinct, ...]
372 METADATA_SUBPROGRAM = 21, // [distinct, ...]
373 METADATA_LEXICAL_BLOCK = 22, // [distinct, scope, file, line, column]
374 METADATA_LEXICAL_BLOCK_FILE = 23, //[distinct, scope, file, discriminator]
375 METADATA_NAMESPACE = 24, // [distinct, scope, file, name, line, exportSymbols]
376 METADATA_TEMPLATE_TYPE = 25, // [distinct, scope, name, type, ...]
377 METADATA_TEMPLATE_VALUE = 26, // [distinct, scope, name, type, value, ...]
378 METADATA_GLOBAL_VAR = 27, // [distinct, ...]
379 METADATA_LOCAL_VAR = 28, // [distinct, ...]
380 METADATA_EXPRESSION = 29, // [distinct, n x element]
381 METADATA_OBJC_PROPERTY = 30, // [distinct, name, file, line, ...]
382 METADATA_IMPORTED_ENTITY = 31, // [distinct, tag, scope, entity, line, name]
383 METADATA_MODULE = 32, // [distinct, scope, name, ...]
384 METADATA_MACRO = 33, // [distinct, macinfo, line, name, value]
385 METADATA_MACRO_FILE = 34, // [distinct, macinfo, line, file, ...]
386 METADATA_STRINGS = 35, // [count, offset] blob([lengths][chars])
387 METADATA_GLOBAL_DECL_ATTACHMENT = 36, // [valueid, n x [id, mdnode]]
388 METADATA_GLOBAL_VAR_EXPR = 37, // [distinct, var, expr]
389 METADATA_INDEX_OFFSET = 38, // [offset]
390 METADATA_INDEX = 39, // [bitpos]
391 METADATA_LABEL = 40, // [distinct, scope, name, file, line]
392 METADATA_STRING_TYPE = 41, // [distinct, name, size, align,...]
393 // Codes 42 and 43 are reserved for support for Fortran array specific debug
394 // info.
395 METADATA_COMMON_BLOCK = 44, // [distinct, scope, name, variable,...]
396 METADATA_GENERIC_SUBRANGE = 45, // [distinct, count, lo, up, stride]
397 METADATA_ARG_LIST = 46, // [n x [type num, value num]]
398 METADATA_ASSIGN_ID = 47, // [distinct, ...]
399 METADATA_SUBRANGE_TYPE = 48, // [distinct, ...]
400 METADATA_FIXED_POINT_TYPE = 49, // [distinct, ...]
401};
402
403// The constants block (CONSTANTS_BLOCK_ID) describes emission for each
404// constant and maintains an implicit current type value.
406 CST_CODE_SETTYPE = 1, // SETTYPE: [typeid]
407 CST_CODE_NULL = 2, // NULL
408 CST_CODE_UNDEF = 3, // UNDEF
409 CST_CODE_INTEGER = 4, // INTEGER: [intval]
410 CST_CODE_WIDE_INTEGER = 5, // WIDE_INTEGER: [n x intval]
411 CST_CODE_FLOAT = 6, // FLOAT: [fpval]
412 CST_CODE_AGGREGATE = 7, // AGGREGATE: [n x value number]
413 CST_CODE_STRING = 8, // STRING: [values]
414 CST_CODE_CSTRING = 9, // CSTRING: [values]
415 CST_CODE_CE_BINOP = 10, // CE_BINOP: [opcode, opval, opval]
416 CST_CODE_CE_CAST = 11, // CE_CAST: [opcode, opty, opval]
417 CST_CODE_CE_GEP_OLD = 12, // CE_GEP: [n x operands]
418 CST_CODE_CE_SELECT = 13, // CE_SELECT: [opval, opval, opval]
419 CST_CODE_CE_EXTRACTELT = 14, // CE_EXTRACTELT: [opty, opval, opval]
420 CST_CODE_CE_INSERTELT = 15, // CE_INSERTELT: [opval, opval, opval]
421 CST_CODE_CE_SHUFFLEVEC = 16, // CE_SHUFFLEVEC: [opval, opval, opval]
422 CST_CODE_CE_CMP = 17, // CE_CMP: [opty, opval, opval, pred]
423 CST_CODE_INLINEASM_OLD = 18, // INLINEASM: [sideeffect|alignstack,
424 // asmstr,conststr]
425 CST_CODE_CE_SHUFVEC_EX = 19, // SHUFVEC_EX: [opty, opval, opval, opval]
426 CST_CODE_CE_INBOUNDS_GEP = 20, // INBOUNDS_GEP: [n x operands]
427 CST_CODE_BLOCKADDRESS = 21, // CST_CODE_BLOCKADDRESS [fnty, fnval, bb#]
428 CST_CODE_DATA = 22, // DATA: [n x elements]
429 CST_CODE_INLINEASM_OLD2 = 23, // INLINEASM: [sideeffect|alignstack|
430 // asmdialect,asmstr,conststr]
431 CST_CODE_CE_GEP_WITH_INRANGE_INDEX_OLD = 24, // [opty, flags, n x operands]
432 CST_CODE_CE_UNOP = 25, // CE_UNOP: [opcode, opval]
433 CST_CODE_POISON = 26, // POISON
434 CST_CODE_DSO_LOCAL_EQUIVALENT = 27, // DSO_LOCAL_EQUIVALENT [gvty, gv]
435 CST_CODE_INLINEASM_OLD3 = 28, // INLINEASM: [sideeffect|alignstack|
436 // asmdialect|unwind,
437 // asmstr,conststr]
438 CST_CODE_NO_CFI_VALUE = 29, // NO_CFI [ fty, f ]
439 CST_CODE_INLINEASM = 30, // INLINEASM: [fnty,
440 // sideeffect|alignstack|
441 // asmdialect|unwind,
442 // asmstr,conststr]
443 CST_CODE_CE_GEP_WITH_INRANGE = 31, // [opty, flags, range, n x operands]
444 CST_CODE_CE_GEP = 32, // [opty, flags, n x operands]
445 CST_CODE_PTRAUTH = 33, // [ptr, key, disc, addrdisc]
446 CST_CODE_PTRAUTH2 = 34, // [ptr, key, disc, addrdisc,
447 // deactivation_symbol]
448 CST_CODE_BYTE = 35, // BYTE: [intval]
449 CST_CODE_WIDE_BYTE = 36, // WIDE_BYTE: [n x intval]
450};
451
452/// CastOpcodes - These are values used in the bitcode files to encode which
453/// cast a CST_CODE_CE_CAST or a XXX refers to. The values of these enums
454/// have no fixed relation to the LLVM IR enum values. Changing these will
455/// break compatibility with old files.
472
473/// UnaryOpcodes - These are values used in the bitcode files to encode which
474/// unop a CST_CODE_CE_UNOP or a XXX refers to. The values of these enums
475/// have no fixed relation to the LLVM IR enum values. Changing these will
476/// break compatibility with old files.
480
481/// BinaryOpcodes - These are values used in the bitcode files to encode which
482/// binop a CST_CODE_CE_BINOP or a XXX refers to. The values of these enums
483/// have no fixed relation to the LLVM IR enum values. Changing these will
484/// break compatibility with old files.
490 BINOP_SDIV = 4, // overloaded for FP
492 BINOP_SREM = 6, // overloaded for FP
499};
500
501/// These are values used in the bitcode files to encode AtomicRMW operations.
502/// The values of these enums have no fixed relation to the LLVM IR enum
503/// values. Changing these will break compatibility with old files.
529
533
534/// OverflowingBinaryOperatorOptionalFlags - Flags for serializing
535/// OverflowingBinaryOperator's SubclassOptionalData contents.
540
541/// TruncInstOptionalFlags - Flags for serializing
542/// TruncInstOptionalFlags's SubclassOptionalData contents.
547
548/// FastMath Flags
549/// This is a fixed layout derived from the bitcode emitted by LLVM 5.0
550/// intended to decouple the in-memory representation from the serialization.
552 UnsafeAlgebra = (1 << 0), // Legacy
553 NoNaNs = (1 << 1),
554 NoInfs = (1 << 2),
555 NoSignedZeros = (1 << 3),
556 AllowReciprocal = (1 << 4),
557 AllowContract = (1 << 5),
558 ApproxFunc = (1 << 6),
559 AllowReassoc = (1 << 7)
560};
561
562/// Flags for serializing PossiblyNonNegInst's SubclassOptionalData contents.
564
565/// PossiblyExactOperatorOptionalFlags - Flags for serializing
566/// PossiblyExactOperator's SubclassOptionalData contents.
568
569/// PossiblyDisjointInstOptionalFlags - Flags for serializing
570/// PossiblyDisjointInst's SubclassOptionalData contents.
572
573/// Mark to distinguish metadata from value in an operator bundle.
575
576/// GetElementPtrOptionalFlags - Flags for serializing
577/// GEPOperator's SubclassOptionalData contents.
583
584/// ICmpOptionalFlags - Flags for serializing
585/// ICmpOptionalFlags's SubclassOptionalData contents.
587
588/// Encoded AtomicOrdering values.
598
599/// Markers and flags for call instruction.
606 CALL_FMF = 17 // Call has optional fast-math-flags.
607};
608
609// The function body block (FUNCTION_BLOCK_ID) describes function bodies. It
610// can contain a constant block (CONSTANTS_BLOCK_ID).
612 FUNC_CODE_DECLAREBLOCKS = 1, // DECLAREBLOCKS: [n]
613
614 FUNC_CODE_INST_BINOP = 2, // BINOP: [opcode, ty, opval, opval]
615 FUNC_CODE_INST_CAST = 3, // CAST: [opcode, ty, opty, opval]
616 FUNC_CODE_INST_GEP_OLD = 4, // GEP: [n x operands]
617 FUNC_CODE_INST_SELECT = 5, // SELECT: [ty, opval, opval, opval]
618 FUNC_CODE_INST_EXTRACTELT = 6, // EXTRACTELT: [opty, opval, opval]
619 FUNC_CODE_INST_INSERTELT = 7, // INSERTELT: [ty, opval, opval, opval]
620 FUNC_CODE_INST_SHUFFLEVEC = 8, // SHUFFLEVEC: [ty, opval, opval, opval]
621 FUNC_CODE_INST_CMP = 9, // CMP: [opty, opval, opval, pred]
622
623 FUNC_CODE_INST_RET = 10, // RET: [opty,opval<both optional>]
624 FUNC_CODE_INST_BR = 11, // BR: [bb#, bb#, cond] or [bb#]
625 FUNC_CODE_INST_SWITCH = 12, // SWITCH: [opty, op0, op1, ...]
626 FUNC_CODE_INST_INVOKE = 13, // INVOKE: [attr, fnty, op0,op1, ...]
627 // 14 is unused.
628 FUNC_CODE_INST_UNREACHABLE = 15, // UNREACHABLE
629
630 FUNC_CODE_INST_PHI = 16, // PHI: [ty, val0,bb0, ...]
631 // 17 is unused.
632 // 18 is unused.
633 FUNC_CODE_INST_ALLOCA = 19, // ALLOCA: [instty, opty, op, align]
634 FUNC_CODE_INST_LOAD = 20, // LOAD: [opty, op, align, vol]
635 // 21 is unused.
636 // 22 is unused.
637 FUNC_CODE_INST_VAARG = 23, // VAARG: [valistty, valist, instty]
638 // This store code encodes the pointer type, rather than the value type
639 // this is so information only available in the pointer type (e.g. address
640 // spaces) is retained.
641 FUNC_CODE_INST_STORE_OLD = 24, // STORE: [ptrty,ptr,val, align, vol]
642 // 25 is unused.
643 FUNC_CODE_INST_EXTRACTVAL = 26, // EXTRACTVAL: [n x operands]
644 FUNC_CODE_INST_INSERTVAL = 27, // INSERTVAL: [n x operands]
645 // fcmp/icmp returning Int1TY or vector of Int1Ty. Same as CMP, exists to
646 // support legacy vicmp/vfcmp instructions.
647 FUNC_CODE_INST_CMP2 = 28, // CMP2: [opty, opval, opval, pred]
648 // new select on i1 or [N x i1]
649 FUNC_CODE_INST_VSELECT = 29, // VSELECT: [ty,opval,opval,predty,pred]
650 FUNC_CODE_INST_INBOUNDS_GEP_OLD = 30, // INBOUNDS_GEP: [n x operands]
651 FUNC_CODE_INST_INDIRECTBR = 31, // INDIRECTBR: [opty, op0, op1, ...]
652 // 32 is unused.
653 FUNC_CODE_DEBUG_LOC_AGAIN = 33, // DEBUG_LOC_AGAIN
654
655 FUNC_CODE_INST_CALL = 34, // CALL: [attr, cc, fnty, fnid, args...]
656
657 FUNC_CODE_DEBUG_LOC = 35, // DEBUG_LOC: [Line,Col,ScopeVal, IAVal]
658 FUNC_CODE_INST_FENCE = 36, // FENCE: [ordering, syncscope]
659 FUNC_CODE_INST_CMPXCHG_OLD = 37, // CMPXCHG: [ptrty, ptr, cmp, val, vol,
660 // ordering, syncscope,
661 // failure_ordering?, weak?]
662 FUNC_CODE_INST_ATOMICRMW_OLD = 38, // ATOMICRMW: [ptrty,ptr,val, operation,
663 // align, vol,
664 // ordering, syncscope]
665 FUNC_CODE_INST_RESUME = 39, // RESUME: [opval]
667 40, // LANDINGPAD: [ty,val,val,num,id0,val0...]
668 FUNC_CODE_INST_LOADATOMIC = 41, // LOAD: [opty, op, align, vol,
669 // ordering, syncscope]
670 FUNC_CODE_INST_STOREATOMIC_OLD = 42, // STORE: [ptrty,ptr,val, align, vol
671 // ordering, syncscope]
672 FUNC_CODE_INST_GEP = 43, // GEP: [inbounds, n x operands]
673 FUNC_CODE_INST_STORE = 44, // STORE: [ptrty,ptr,valty,val, align, vol]
674 FUNC_CODE_INST_STOREATOMIC = 45, // STORE: [ptrty,ptr,val, align, vol
675 FUNC_CODE_INST_CMPXCHG = 46, // CMPXCHG: [ptrty, ptr, cmp, val, vol,
676 // success_ordering, syncscope,
677 // failure_ordering, weak]
678 FUNC_CODE_INST_LANDINGPAD = 47, // LANDINGPAD: [ty,val,num,id0,val0...]
679 FUNC_CODE_INST_CLEANUPRET = 48, // CLEANUPRET: [val] or [val,bb#]
680 FUNC_CODE_INST_CATCHRET = 49, // CATCHRET: [val,bb#]
681 FUNC_CODE_INST_CATCHPAD = 50, // CATCHPAD: [bb#,bb#,num,args...]
682 FUNC_CODE_INST_CLEANUPPAD = 51, // CLEANUPPAD: [num,args...]
684 52, // CATCHSWITCH: [num,args...] or [num,args...,bb]
685 // 53 is unused.
686 // 54 is unused.
687 FUNC_CODE_OPERAND_BUNDLE = 55, // OPERAND_BUNDLE: [tag#, value...]
688 FUNC_CODE_INST_UNOP = 56, // UNOP: [opcode, ty, opval]
689 FUNC_CODE_INST_CALLBR = 57, // CALLBR: [attr, cc, norm, transfs,
690 // fnty, fnid, args...]
691 FUNC_CODE_INST_FREEZE = 58, // FREEZE: [opty, opval]
692 FUNC_CODE_INST_ATOMICRMW = 59, // ATOMICRMW: [ptrty, ptr, valty, val,
693 // operation, align, vol,
694 // ordering, syncscope]
695 FUNC_CODE_BLOCKADDR_USERS = 60, // BLOCKADDR_USERS: [value...]
696
698 61, // [DILocation, DILocalVariable, DIExpression, ValueAsMetadata]
700 62, // [DILocation, DILocalVariable, DIExpression, ValueAsMetadata]
702 63, // [DILocation, DILocalVariable, DIExpression, ValueAsMetadata,
703 // DIAssignID, DIExpression (addr), ValueAsMetadata (addr)]
705 64, // [DILocation, DILocalVariable, DIExpression, Value]
706 FUNC_CODE_DEBUG_RECORD_LABEL = 65, // [DILocation, DILabel]
708 66, // [DILocation, DILocalVariable, DIExpression, ValueAsMetadata]
709};
710
712 USELIST_CODE_DEFAULT = 1, // DEFAULT: [index..., value-id]
713 USELIST_CODE_BB = 2 // BB: [index..., bb-id]
714};
715
717 // = 0 is unused
826};
827
835
838};
839
842};
843
844} // End bitc namespace
845} // End llvm namespace
846
847#endif
TypeCodes
TYPE blocks have codes for each type primitive they use.
@ TYPE_CODE_TARGET_TYPE
@ TYPE_CODE_STRUCT_ANON
@ TYPE_CODE_STRUCT_NAME
@ TYPE_CODE_OPAQUE_POINTER
@ TYPE_CODE_FUNCTION_OLD
@ TYPE_CODE_STRUCT_NAMED
@ METADATA_COMMON_BLOCK
@ METADATA_TEMPLATE_VALUE
@ METADATA_LEXICAL_BLOCK_FILE
@ METADATA_INDEX_OFFSET
@ METADATA_LEXICAL_BLOCK
@ METADATA_SUBROUTINE_TYPE
@ METADATA_GLOBAL_DECL_ATTACHMENT
@ METADATA_OBJC_PROPERTY
@ METADATA_IMPORTED_ENTITY
@ METADATA_GENERIC_SUBRANGE
@ METADATA_COMPILE_UNIT
@ METADATA_COMPOSITE_TYPE
@ METADATA_FIXED_POINT_TYPE
@ METADATA_DERIVED_TYPE
@ METADATA_SUBRANGE_TYPE
@ METADATA_TEMPLATE_TYPE
@ METADATA_GLOBAL_VAR_EXPR
@ METADATA_DISTINCT_NODE
@ METADATA_GENERIC_DEBUG
RMWOperations
These are values used in the bitcode files to encode AtomicRMW operations.
GlobalValueSummarySymtabCodes
@ FS_CONTEXT_RADIX_TREE_ARRAY
@ FS_COMBINED_GLOBALVAR_INIT_REFS
@ FS_TYPE_CHECKED_LOAD_VCALLS
@ FS_COMBINED_ORIGINAL_NAME
@ FS_PERMODULE_VTABLE_GLOBALVAR_INIT_REFS
@ FS_TYPE_TEST_ASSUME_CONST_VCALL
@ FS_PERMODULE_GLOBALVAR_INIT_REFS
@ FS_TYPE_TEST_ASSUME_VCALLS
@ FS_COMBINED_ALLOC_INFO_NO_CONTEXT
@ FS_CFI_FUNCTION_DECLS
@ FS_COMBINED_CALLSITE_INFO
@ FS_COMBINED_ALLOC_INFO
@ FS_PERMODULE_CALLSITE_INFO
@ FS_PERMODULE_ALLOC_INFO
@ FS_TYPE_CHECKED_LOAD_CONST_VCALL
PossiblyNonNegInstOptionalFlags
Flags for serializing PossiblyNonNegInst's SubclassOptionalData contents.
@ BITCODE_CURRENT_EPOCH
IdentificationCodes
Identification block contains a string that describes the producer details, and an epoch that defines...
@ IDENTIFICATION_CODE_EPOCH
@ IDENTIFICATION_CODE_STRING
@ CST_CODE_CE_INBOUNDS_GEP
@ CST_CODE_INLINEASM_OLD3
@ CST_CODE_BLOCKADDRESS
@ CST_CODE_NO_CFI_VALUE
@ CST_CODE_CE_SHUFVEC_EX
@ CST_CODE_CE_EXTRACTELT
@ CST_CODE_INLINEASM_OLD
@ CST_CODE_CE_GEP_WITH_INRANGE_INDEX_OLD
@ CST_CODE_CE_SHUFFLEVEC
@ CST_CODE_WIDE_INTEGER
@ CST_CODE_DSO_LOCAL_EQUIVALENT
@ CST_CODE_CE_INSERTELT
@ CST_CODE_INLINEASM_OLD2
@ CST_CODE_CE_GEP_WITH_INRANGE
GetElementPtrOptionalFlags
GetElementPtrOptionalFlags - Flags for serializing GEPOperator's SubclassOptionalData contents.
CallMarkersFlags
Markers and flags for call instruction.
@ VST_CODE_COMBINED_ENTRY
PossiblyExactOperatorOptionalFlags
PossiblyExactOperatorOptionalFlags - Flags for serializing PossiblyExactOperator's SubclassOptionalDa...
@ COMDAT_SELECTION_KIND_LARGEST
@ COMDAT_SELECTION_KIND_ANY
@ COMDAT_SELECTION_KIND_SAME_SIZE
@ COMDAT_SELECTION_KIND_EXACT_MATCH
@ COMDAT_SELECTION_KIND_NO_DUPLICATES
@ ATTR_KIND_STACK_PROTECT
@ ATTR_KIND_STACK_PROTECT_STRONG
@ ATTR_KIND_SANITIZE_MEMORY
@ ATTR_KIND_OPTIMIZE_FOR_SIZE
@ ATTR_KIND_SWIFT_ERROR
@ ATTR_KIND_INACCESSIBLEMEM_ONLY
@ ATTR_KIND_NO_CALLBACK
@ ATTR_KIND_FNRETTHUNK_EXTERN
@ ATTR_KIND_NO_DIVERGENCE_SOURCE
@ ATTR_KIND_SANITIZE_ADDRESS
@ ATTR_KIND_NO_IMPLICIT_FLOAT
@ ATTR_KIND_DEAD_ON_UNWIND
@ ATTR_KIND_STACK_ALIGNMENT
@ ATTR_KIND_INACCESSIBLEMEM_OR_ARGMEMONLY
@ ATTR_KIND_STACK_PROTECT_REQ
@ ATTR_KIND_INLINE_HINT
@ ATTR_KIND_NULL_POINTER_IS_VALID
@ ATTR_KIND_SANITIZE_HWADDRESS
@ ATTR_KIND_MUSTPROGRESS
@ ATTR_KIND_RETURNS_TWICE
@ ATTR_KIND_SHADOWCALLSTACK
@ ATTR_KIND_OPT_FOR_FUZZING
@ ATTR_KIND_DENORMAL_FPENV
@ ATTR_KIND_SANITIZE_NUMERICAL_STABILITY
@ ATTR_KIND_INITIALIZES
@ ATTR_KIND_ALLOCATED_POINTER
@ ATTR_KIND_DISABLE_SANITIZER_INSTRUMENTATION
@ ATTR_KIND_SKIP_PROFILE
@ ATTR_KIND_ELEMENTTYPE
@ ATTR_KIND_CORO_ELIDE_SAFE
@ ATTR_KIND_NO_DUPLICATE
@ ATTR_KIND_ALLOC_ALIGN
@ ATTR_KIND_NON_LAZY_BIND
@ ATTR_KIND_DEREFERENCEABLE
@ ATTR_KIND_OPTIMIZE_NONE
@ ATTR_KIND_HYBRID_PATCHABLE
@ ATTR_KIND_NO_RED_ZONE
@ ATTR_KIND_DEREFERENCEABLE_OR_NULL
@ ATTR_KIND_SANITIZE_REALTIME
@ ATTR_KIND_SPECULATIVE_LOAD_HARDENING
@ ATTR_KIND_ALWAYS_INLINE
@ ATTR_KIND_SANITIZE_TYPE
@ ATTR_KIND_PRESPLIT_COROUTINE
@ ATTR_KIND_VSCALE_RANGE
@ ATTR_KIND_SANITIZE_ALLOC_TOKEN
@ ATTR_KIND_NO_SANITIZE_COVERAGE
@ ATTR_KIND_NO_CREATE_UNDEF_OR_POISON
@ ATTR_KIND_SPECULATABLE
@ ATTR_KIND_DEAD_ON_RETURN
@ ATTR_KIND_SANITIZE_REALTIME_BLOCKING
@ ATTR_KIND_NO_SANITIZE_BOUNDS
@ ATTR_KIND_SANITIZE_MEMTAG
@ ATTR_KIND_CORO_ONLY_DESTROY_WHEN_COMPLETE
@ ATTR_KIND_SANITIZE_THREAD
@ ATTR_KIND_OPTIMIZE_FOR_DEBUGGING
@ ATTR_KIND_PREALLOCATED
@ ATTR_KIND_SWIFT_ASYNC
OverflowingBinaryOperatorOptionalFlags
OverflowingBinaryOperatorOptionalFlags - Flags for serializing OverflowingBinaryOperator's SubclassOp...
TruncInstOptionalFlags
TruncInstOptionalFlags - Flags for serializing TruncInstOptionalFlags's SubclassOptionalData contents...
UnaryOpcodes
UnaryOpcodes - These are values used in the bitcode files to encode which unop a CST_CODE_CE_UNOP or ...
@ SYNC_SCOPE_NAMES_BLOCK_ID
@ PARAMATTR_GROUP_BLOCK_ID
@ METADATA_KIND_BLOCK_ID
@ IDENTIFICATION_BLOCK_ID
@ GLOBALVAL_SUMMARY_BLOCK_ID
@ METADATA_ATTACHMENT_ID
@ FULL_LTO_GLOBALVAL_SUMMARY_BLOCK_ID
@ MODULE_STRTAB_BLOCK_ID
@ VALUE_SYMTAB_BLOCK_ID
@ OPERAND_BUNDLE_TAGS_BLOCK_ID
MetadataOperandBundleValueMarker
Mark to distinguish metadata from value in an operator bundle.
CastOpcodes
CastOpcodes - These are values used in the bitcode files to encode which cast a CST_CODE_CE_CAST or a...
@ FIRST_APPLICATION_BLOCKID
ModuleCodes
MODULE blocks have a number of optional fields and subblocks.
@ MODULE_CODE_VERSION
@ MODULE_CODE_SOURCE_FILENAME
@ MODULE_CODE_SECTIONNAME
@ MODULE_CODE_METADATA_VALUES_UNUSED
@ MODULE_CODE_DATALAYOUT
@ MODULE_CODE_GLOBALVAR
@ MODULE_CODE_ALIAS_OLD
@ MODULE_CODE_VSTOFFSET
@ FUNC_CODE_INST_ATOMICRMW_OLD
@ FUNC_CODE_INST_CATCHRET
@ FUNC_CODE_INST_LANDINGPAD
@ FUNC_CODE_INST_EXTRACTVAL
@ FUNC_CODE_INST_CATCHPAD
@ FUNC_CODE_INST_RESUME
@ FUNC_CODE_INST_CALLBR
@ FUNC_CODE_INST_CATCHSWITCH
@ FUNC_CODE_INST_INBOUNDS_GEP_OLD
@ FUNC_CODE_INST_VSELECT
@ FUNC_CODE_INST_GEP_OLD
@ FUNC_CODE_INST_STOREATOMIC_OLD
@ FUNC_CODE_INST_CLEANUPRET
@ FUNC_CODE_INST_LANDINGPAD_OLD
@ FUNC_CODE_DEBUG_RECORD_VALUE
@ FUNC_CODE_INST_LOADATOMIC
@ FUNC_CODE_DEBUG_RECORD_ASSIGN
@ FUNC_CODE_INST_STOREATOMIC
@ FUNC_CODE_INST_ATOMICRMW
@ FUNC_CODE_DEBUG_RECORD_DECLARE_VALUE
@ FUNC_CODE_DEBUG_LOC_AGAIN
@ FUNC_CODE_INST_EXTRACTELT
@ FUNC_CODE_INST_INDIRECTBR
@ FUNC_CODE_INST_INVOKE
@ FUNC_CODE_DEBUG_RECORD_VALUE_SIMPLE
@ FUNC_CODE_INST_INSERTVAL
@ FUNC_CODE_DECLAREBLOCKS
@ FUNC_CODE_DEBUG_RECORD_LABEL
@ FUNC_CODE_INST_SWITCH
@ FUNC_CODE_INST_ALLOCA
@ FUNC_CODE_INST_INSERTELT
@ FUNC_CODE_INST_SELECT
@ FUNC_CODE_BLOCKADDR_USERS
@ FUNC_CODE_INST_CLEANUPPAD
@ FUNC_CODE_INST_SHUFFLEVEC
@ FUNC_CODE_INST_STORE_OLD
@ FUNC_CODE_INST_FREEZE
@ FUNC_CODE_INST_CMPXCHG
@ FUNC_CODE_INST_UNREACHABLE
@ FUNC_CODE_INST_CMPXCHG_OLD
@ FUNC_CODE_DEBUG_RECORD_DECLARE
@ FUNC_CODE_OPERAND_BUNDLE
ICmpOptionalFlags
ICmpOptionalFlags - Flags for serializing ICmpOptionalFlags's SubclassOptionalData contents.
PossiblyDisjointInstOptionalFlags
PossiblyDisjointInstOptionalFlags - Flags for serializing PossiblyDisjointInst's SubclassOptionalData...
FastMathMap
FastMath Flags This is a fixed layout derived from the bitcode emitted by LLVM 5.0 intended to decoup...
AttributeCodes
PARAMATTR blocks have code for defining a parameter attribute set.
@ PARAMATTR_CODE_ENTRY_OLD
@ PARAMATTR_GRP_CODE_ENTRY
BinaryOpcodes
BinaryOpcodes - These are values used in the bitcode files to encode which binop a CST_CODE_CE_BINOP ...
AtomicOrderingCodes
Encoded AtomicOrdering values.
This is an optimization pass for GlobalISel generic memory operations.