llvm.org GIT mirror llvm / ca1975c
clang-format the large enum definitions in LLVMBitCodes.h Suggestion from Duncan in a review thread. From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265075 91177308-0d34-0410-b5e6-96231b3b80d8 Mehdi Amini 4 years ago
1 changed file(s) with 447 addition(s) and 447 deletion(s). Raw diff Collapse all Expand all
2121
2222 namespace llvm {
2323 namespace bitc {
24 // The only top-level block type defined is for a module.
24 // The only top-level block type defined is for a module.
2525 enum BlockIDs {
2626 // Blocks
2727 MODULE_BLOCK_ID = FIRST_APPLICATION_BLOCKID,
6969 /// also accepts N-1.
7070 enum { BITCODE_CURRENT_EPOCH = 0 };
7171
72 /// MODULE blocks have a number of optional fields and subblocks.
73 enum ModuleCodes {
74 MODULE_CODE_VERSION = 1, // VERSION: [version#]
75 MODULE_CODE_TRIPLE = 2, // TRIPLE: [strchr x N]
76 MODULE_CODE_DATALAYOUT = 3, // DATALAYOUT: [strchr x N]
77 MODULE_CODE_ASM = 4, // ASM: [strchr x N]
78 MODULE_CODE_SECTIONNAME = 5, // SECTIONNAME: [strchr x N]
79
80 // FIXME: Remove DEPLIB in 4.0.
81 MODULE_CODE_DEPLIB = 6, // DEPLIB: [strchr x N]
82
83 // GLOBALVAR: [pointer type, isconst, initid,
84 // linkage, alignment, section, visibility, threadlocal]
85 MODULE_CODE_GLOBALVAR = 7,
86
87 // FUNCTION: [type, callingconv, isproto, linkage, paramattrs, alignment,
88 // section, visibility, gc, unnamed_addr]
89 MODULE_CODE_FUNCTION = 8,
90
91 // ALIAS: [alias type, aliasee val#, linkage, visibility]
92 MODULE_CODE_ALIAS_OLD = 9,
93
94 // MODULE_CODE_PURGEVALS: [numvals]
95 MODULE_CODE_PURGEVALS = 10,
96
97 MODULE_CODE_GCNAME = 11, // GCNAME: [strchr x N]
98 MODULE_CODE_COMDAT = 12, // COMDAT: [selection_kind, name]
99
100 MODULE_CODE_VSTOFFSET = 13, // VSTOFFSET: [offset]
101
102 // ALIAS: [alias value type, addrspace, aliasee val#, linkage, visibility]
103 MODULE_CODE_ALIAS = 14,
104
105 MODULE_CODE_METADATA_VALUES_UNUSED = 15,
106
107 // SOURCE_FILENAME: [namechar x N]
108 MODULE_CODE_SOURCE_FILENAME = 16,
109 };
110
111 /// PARAMATTR blocks have code for defining a parameter attribute set.
112 enum AttributeCodes {
113 // FIXME: Remove `PARAMATTR_CODE_ENTRY_OLD' in 4.0
114 PARAMATTR_CODE_ENTRY_OLD = 1, // ENTRY: [paramidx0, attr0,
115 // paramidx1, attr1...]
116 PARAMATTR_CODE_ENTRY = 2, // ENTRY: [paramidx0, attrgrp0,
117 // paramidx1, attrgrp1, ...]
118 PARAMATTR_GRP_CODE_ENTRY = 3 // ENTRY: [id, attr0, att1, ...]
119 };
120
121 /// TYPE blocks have codes for each type primitive they use.
122 enum TypeCodes {
123 TYPE_CODE_NUMENTRY = 1, // NUMENTRY: [numentries]
124
125 // Type Codes
126 TYPE_CODE_VOID = 2, // VOID
127 TYPE_CODE_FLOAT = 3, // FLOAT
128 TYPE_CODE_DOUBLE = 4, // DOUBLE
129 TYPE_CODE_LABEL = 5, // LABEL
130 TYPE_CODE_OPAQUE = 6, // OPAQUE
131 TYPE_CODE_INTEGER = 7, // INTEGER: [width]
132 TYPE_CODE_POINTER = 8, // POINTER: [pointee type]
133
134 TYPE_CODE_FUNCTION_OLD = 9, // FUNCTION: [vararg, attrid, retty,
135 // paramty x N]
136
137 TYPE_CODE_HALF = 10, // HALF
138
139 TYPE_CODE_ARRAY = 11, // ARRAY: [numelts, eltty]
140 TYPE_CODE_VECTOR = 12, // VECTOR: [numelts, eltty]
141
142 // These are not with the other floating point types because they're
143 // a late addition, and putting them in the right place breaks
144 // binary compatibility.
145 TYPE_CODE_X86_FP80 = 13, // X86 LONG DOUBLE
146 TYPE_CODE_FP128 = 14, // LONG DOUBLE (112 bit mantissa)
147 TYPE_CODE_PPC_FP128= 15, // PPC LONG DOUBLE (2 doubles)
148
149 TYPE_CODE_METADATA = 16, // METADATA
150
151 TYPE_CODE_X86_MMX = 17, // X86 MMX
152
153 TYPE_CODE_STRUCT_ANON = 18, // STRUCT_ANON: [ispacked, eltty x N]
154 TYPE_CODE_STRUCT_NAME = 19, // STRUCT_NAME: [strchr x N]
155 TYPE_CODE_STRUCT_NAMED = 20,// STRUCT_NAMED: [ispacked, eltty x N]
156
157 TYPE_CODE_FUNCTION = 21, // FUNCTION: [vararg, retty, paramty x N]
158
159 TYPE_CODE_TOKEN = 22 // TOKEN
160 };
161
162 enum OperandBundleTagCode {
163 OPERAND_BUNDLE_TAG = 1, // TAG: [strchr x N]
164 };
165
166 // The type symbol table only has one code (TST_ENTRY_CODE).
167 enum TypeSymtabCodes {
168 TST_CODE_ENTRY = 1 // TST_ENTRY: [typeid, namechar x N]
169 };
170
171 // Value symbol table codes.
172 enum ValueSymtabCodes {
173 VST_CODE_ENTRY = 1, // VST_ENTRY: [valueid, namechar x N]
174 VST_CODE_BBENTRY = 2, // VST_BBENTRY: [bbid, namechar x N]
175 VST_CODE_FNENTRY = 3, // VST_FNENTRY: [valueid, offset, namechar x N]
176 // VST_COMBINED_GVDEFENTRY: [valueid, sumoffset, guid]
177 VST_CODE_COMBINED_GVDEFENTRY = 4,
178 // VST_COMBINED_ENTRY: [valueid, refguid]
179 VST_CODE_COMBINED_ENTRY = 5
180 };
181
182 // The module path symbol table only has one code (MST_CODE_ENTRY).
183 enum ModulePathSymtabCodes {
184 MST_CODE_ENTRY = 1, // MST_ENTRY: [modid, namechar x N]
185 };
186
187 // The summary section uses different codes in the per-module
188 // and combined index cases.
189 enum GlobalValueSummarySymtabCodes {
190 // PERMODULE: [valueid, linkage, instcount, numrefs, numrefs x valueid,
191 // n x (valueid, callsitecount)]
192 FS_PERMODULE = 1,
193 // PERMODULE_PROFILE: [valueid, linkage, instcount, numrefs,
194 // numrefs x valueid,
195 // n x (valueid, callsitecount, profilecount)]
196 FS_PERMODULE_PROFILE = 2,
197 // PERMODULE_GLOBALVAR_INIT_REFS: [valueid, linkage, n x valueid]
198 FS_PERMODULE_GLOBALVAR_INIT_REFS = 3,
199 // COMBINED: [modid, linkage, instcount, numrefs, numrefs x valueid,
200 // n x (valueid, callsitecount)]
201 FS_COMBINED = 4,
202 // COMBINED_PROFILE: [modid, linkage, instcount, numrefs,
203 // numrefs x valueid,
204 // n x (valueid, callsitecount, profilecount)]
205 FS_COMBINED_PROFILE = 5,
206 // COMBINED_GLOBALVAR_INIT_REFS: [modid, linkage, n x valueid]
207 FS_COMBINED_GLOBALVAR_INIT_REFS = 6,
208 };
209
210 enum MetadataCodes {
211 METADATA_STRING_OLD = 1, // MDSTRING: [values]
212 METADATA_VALUE = 2, // VALUE: [type num, value num]
213 METADATA_NODE = 3, // NODE: [n x md num]
214 METADATA_NAME = 4, // STRING: [values]
215 METADATA_DISTINCT_NODE = 5, // DISTINCT_NODE: [n x md num]
216 METADATA_KIND = 6, // [n x [id, name]]
217 METADATA_LOCATION = 7, // [distinct, line, col, scope, inlined-at?]
218 METADATA_OLD_NODE = 8, // OLD_NODE: [n x (type num, value num)]
219 METADATA_OLD_FN_NODE = 9, // OLD_FN_NODE: [n x (type num, value num)]
220 METADATA_NAMED_NODE = 10, // NAMED_NODE: [n x mdnodes]
221 METADATA_ATTACHMENT = 11, // [m x [value, [n x [id, mdnode]]]
222 METADATA_GENERIC_DEBUG = 12, // [distinct, tag, vers, header, n x md num]
223 METADATA_SUBRANGE = 13, // [distinct, count, lo]
224 METADATA_ENUMERATOR = 14, // [distinct, value, name]
225 METADATA_BASIC_TYPE = 15, // [distinct, tag, name, size, align, enc]
226 METADATA_FILE = 16, // [distinct, filename, directory]
227 METADATA_DERIVED_TYPE = 17, // [distinct, ...]
228 METADATA_COMPOSITE_TYPE= 18, // [distinct, ...]
229 METADATA_SUBROUTINE_TYPE=19, // [distinct, flags, types]
230 METADATA_COMPILE_UNIT = 20, // [distinct, ...]
231 METADATA_SUBPROGRAM = 21, // [distinct, ...]
232 METADATA_LEXICAL_BLOCK = 22, // [distinct, scope, file, line, column]
233 METADATA_LEXICAL_BLOCK_FILE=23,//[distinct, scope, file, discriminator]
234 METADATA_NAMESPACE = 24, // [distinct, scope, file, name, line]
235 METADATA_TEMPLATE_TYPE = 25, // [distinct, scope, name, type, ...]
236 METADATA_TEMPLATE_VALUE= 26, // [distinct, scope, name, type, value, ...]
237 METADATA_GLOBAL_VAR = 27, // [distinct, ...]
238 METADATA_LOCAL_VAR = 28, // [distinct, ...]
239 METADATA_EXPRESSION = 29, // [distinct, n x element]
240 METADATA_OBJC_PROPERTY = 30, // [distinct, name, file, line, ...]
241 METADATA_IMPORTED_ENTITY=31, // [distinct, tag, scope, entity, line, name]
242 METADATA_MODULE = 32, // [distinct, scope, name, ...]
243 METADATA_MACRO = 33, // [distinct, macinfo, line, name, value]
244 METADATA_MACRO_FILE = 34, // [distinct, macinfo, line, file, ...]
245 METADATA_STRINGS = 35, // [count, offset] blob([lengths][chars])
246 };
247
248 // The constants block (CONSTANTS_BLOCK_ID) describes emission for each
249 // constant and maintains an implicit current type value.
250 enum ConstantsCodes {
251 CST_CODE_SETTYPE = 1, // SETTYPE: [typeid]
252 CST_CODE_NULL = 2, // NULL
253 CST_CODE_UNDEF = 3, // UNDEF
254 CST_CODE_INTEGER = 4, // INTEGER: [intval]
255 CST_CODE_WIDE_INTEGER = 5, // WIDE_INTEGER: [n x intval]
256 CST_CODE_FLOAT = 6, // FLOAT: [fpval]
257 CST_CODE_AGGREGATE = 7, // AGGREGATE: [n x value number]
258 CST_CODE_STRING = 8, // STRING: [values]
259 CST_CODE_CSTRING = 9, // CSTRING: [values]
260 CST_CODE_CE_BINOP = 10, // CE_BINOP: [opcode, opval, opval]
261 CST_CODE_CE_CAST = 11, // CE_CAST: [opcode, opty, opval]
262 CST_CODE_CE_GEP = 12, // CE_GEP: [n x operands]
263 CST_CODE_CE_SELECT = 13, // CE_SELECT: [opval, opval, opval]
264 CST_CODE_CE_EXTRACTELT = 14, // CE_EXTRACTELT: [opty, opval, opval]
265 CST_CODE_CE_INSERTELT = 15, // CE_INSERTELT: [opval, opval, opval]
266 CST_CODE_CE_SHUFFLEVEC = 16, // CE_SHUFFLEVEC: [opval, opval, opval]
267 CST_CODE_CE_CMP = 17, // CE_CMP: [opty, opval, opval, pred]
268 CST_CODE_INLINEASM_OLD = 18, // INLINEASM: [sideeffect|alignstack,
269 // asmstr,conststr]
270 CST_CODE_CE_SHUFVEC_EX = 19, // SHUFVEC_EX: [opty, opval, opval, opval]
271 CST_CODE_CE_INBOUNDS_GEP = 20,// INBOUNDS_GEP: [n x operands]
272 CST_CODE_BLOCKADDRESS = 21, // CST_CODE_BLOCKADDRESS [fnty, fnval, bb#]
273 CST_CODE_DATA = 22, // DATA: [n x elements]
274 CST_CODE_INLINEASM = 23 // INLINEASM: [sideeffect|alignstack|
275 // asmdialect,asmstr,conststr]
276 };
277
278 /// CastOpcodes - These are values used in the bitcode files to encode which
279 /// cast a CST_CODE_CE_CAST or a XXX refers to. The values of these enums
280 /// have no fixed relation to the LLVM IR enum values. Changing these will
281 /// break compatibility with old files.
282 enum CastOpcodes {
283 CAST_TRUNC = 0,
284 CAST_ZEXT = 1,
285 CAST_SEXT = 2,
286 CAST_FPTOUI = 3,
287 CAST_FPTOSI = 4,
288 CAST_UITOFP = 5,
289 CAST_SITOFP = 6,
290 CAST_FPTRUNC = 7,
291 CAST_FPEXT = 8,
292 CAST_PTRTOINT = 9,
293 CAST_INTTOPTR = 10,
294 CAST_BITCAST = 11,
295 CAST_ADDRSPACECAST = 12
296 };
297
298 /// BinaryOpcodes - These are values used in the bitcode files to encode which
299 /// binop a CST_CODE_CE_BINOP or a XXX refers to. The values of these enums
300 /// have no fixed relation to the LLVM IR enum values. Changing these will
301 /// break compatibility with old files.
302 enum BinaryOpcodes {
303 BINOP_ADD = 0,
304 BINOP_SUB = 1,
305 BINOP_MUL = 2,
306 BINOP_UDIV = 3,
307 BINOP_SDIV = 4, // overloaded for FP
308 BINOP_UREM = 5,
309 BINOP_SREM = 6, // overloaded for FP
310 BINOP_SHL = 7,
311 BINOP_LSHR = 8,
312 BINOP_ASHR = 9,
313 BINOP_AND = 10,
314 BINOP_OR = 11,
315 BINOP_XOR = 12
316 };
317
318 /// These are values used in the bitcode files to encode AtomicRMW operations.
319 /// The values of these enums have no fixed relation to the LLVM IR enum
320 /// values. Changing these will break compatibility with old files.
321 enum RMWOperations {
322 RMW_XCHG = 0,
323 RMW_ADD = 1,
324 RMW_SUB = 2,
325 RMW_AND = 3,
326 RMW_NAND = 4,
327 RMW_OR = 5,
328 RMW_XOR = 6,
329 RMW_MAX = 7,
330 RMW_MIN = 8,
331 RMW_UMAX = 9,
332 RMW_UMIN = 10
333 };
334
335 /// OverflowingBinaryOperatorOptionalFlags - Flags for serializing
336 /// OverflowingBinaryOperator's SubclassOptionalData contents.
337 enum OverflowingBinaryOperatorOptionalFlags {
338 OBO_NO_UNSIGNED_WRAP = 0,
339 OBO_NO_SIGNED_WRAP = 1
340 };
341
342 /// PossiblyExactOperatorOptionalFlags - Flags for serializing
343 /// PossiblyExactOperator's SubclassOptionalData contents.
344 enum PossiblyExactOperatorOptionalFlags {
345 PEO_EXACT = 0
346 };
347
348 /// Encoded AtomicOrdering values.
349 enum AtomicOrderingCodes {
350 ORDERING_NOTATOMIC = 0,
351 ORDERING_UNORDERED = 1,
352 ORDERING_MONOTONIC = 2,
353 ORDERING_ACQUIRE = 3,
354 ORDERING_RELEASE = 4,
355 ORDERING_ACQREL = 5,
356 ORDERING_SEQCST = 6
357 };
358
359 /// Encoded SynchronizationScope values.
360 enum AtomicSynchScopeCodes {
361 SYNCHSCOPE_SINGLETHREAD = 0,
362 SYNCHSCOPE_CROSSTHREAD = 1
363 };
364
365 /// Markers and flags for call instruction.
366 enum CallMarkersFlags {
367 CALL_TAIL = 0,
368 CALL_CCONV = 1,
369 CALL_MUSTTAIL = 14,
370 CALL_EXPLICIT_TYPE = 15,
371 CALL_NOTAIL = 16,
372 CALL_FMF = 17 // Call has optional fast-math-flags.
373 };
374
375 // The function body block (FUNCTION_BLOCK_ID) describes function bodies. It
376 // can contain a constant block (CONSTANTS_BLOCK_ID).
377 enum FunctionCodes {
378 FUNC_CODE_DECLAREBLOCKS = 1, // DECLAREBLOCKS: [n]
379
380 FUNC_CODE_INST_BINOP = 2, // BINOP: [opcode, ty, opval, opval]
381 FUNC_CODE_INST_CAST = 3, // CAST: [opcode, ty, opty, opval]
382 FUNC_CODE_INST_GEP_OLD = 4, // GEP: [n x operands]
383 FUNC_CODE_INST_SELECT = 5, // SELECT: [ty, opval, opval, opval]
384 FUNC_CODE_INST_EXTRACTELT = 6, // EXTRACTELT: [opty, opval, opval]
385 FUNC_CODE_INST_INSERTELT = 7, // INSERTELT: [ty, opval, opval, opval]
386 FUNC_CODE_INST_SHUFFLEVEC = 8, // SHUFFLEVEC: [ty, opval, opval, opval]
387 FUNC_CODE_INST_CMP = 9, // CMP: [opty, opval, opval, pred]
388
389 FUNC_CODE_INST_RET = 10, // RET: [opty,opval]
390 FUNC_CODE_INST_BR = 11, // BR: [bb#, bb#, cond] or [bb#]
391 FUNC_CODE_INST_SWITCH = 12, // SWITCH: [opty, op0, op1, ...]
392 FUNC_CODE_INST_INVOKE = 13, // INVOKE: [attr, fnty, op0,op1, ...]
393 // 14 is unused.
394 FUNC_CODE_INST_UNREACHABLE = 15, // UNREACHABLE
395
396 FUNC_CODE_INST_PHI = 16, // PHI: [ty, val0,bb0, ...]
397 // 17 is unused.
398 // 18 is unused.
399 FUNC_CODE_INST_ALLOCA = 19, // ALLOCA: [instty, opty, op, align]
400 FUNC_CODE_INST_LOAD = 20, // LOAD: [opty, op, align, vol]
401 // 21 is unused.
402 // 22 is unused.
403 FUNC_CODE_INST_VAARG = 23, // VAARG: [valistty, valist, instty]
404 // This store code encodes the pointer type, rather than the value type
405 // this is so information only available in the pointer type (e.g. address
406 // spaces) is retained.
407 FUNC_CODE_INST_STORE_OLD = 24, // STORE: [ptrty,ptr,val, align, vol]
408 // 25 is unused.
409 FUNC_CODE_INST_EXTRACTVAL = 26, // EXTRACTVAL: [n x operands]
410 FUNC_CODE_INST_INSERTVAL = 27, // INSERTVAL: [n x operands]
411 // fcmp/icmp returning Int1TY or vector of Int1Ty. Same as CMP, exists to
412 // support legacy vicmp/vfcmp instructions.
413 FUNC_CODE_INST_CMP2 = 28, // CMP2: [opty, opval, opval, pred]
414 // new select on i1 or [N x i1]
415 FUNC_CODE_INST_VSELECT = 29, // VSELECT: [ty,opval,opval,predty,pred]
416 FUNC_CODE_INST_INBOUNDS_GEP_OLD = 30, // INBOUNDS_GEP: [n x operands]
417 FUNC_CODE_INST_INDIRECTBR = 31, // INDIRECTBR: [opty, op0, op1, ...]
418 // 32 is unused.
419 FUNC_CODE_DEBUG_LOC_AGAIN = 33, // DEBUG_LOC_AGAIN
420
421 FUNC_CODE_INST_CALL = 34, // CALL: [attr, cc, fnty, fnid, args...]
422
423 FUNC_CODE_DEBUG_LOC = 35, // DEBUG_LOC: [Line,Col,ScopeVal, IAVal]
424 FUNC_CODE_INST_FENCE = 36, // FENCE: [ordering, synchscope]
425 FUNC_CODE_INST_CMPXCHG_OLD = 37, // CMPXCHG: [ptrty,ptr,cmp,new, align, vol,
426 // ordering, synchscope]
427 FUNC_CODE_INST_ATOMICRMW = 38, // ATOMICRMW: [ptrty,ptr,val, operation,
428 // align, vol,
429 // ordering, synchscope]
430 FUNC_CODE_INST_RESUME = 39, // RESUME: [opval]
431 FUNC_CODE_INST_LANDINGPAD_OLD = 40, // LANDINGPAD: [ty,val,val,num,id0,val0...]
432 FUNC_CODE_INST_LOADATOMIC = 41, // LOAD: [opty, op, align, vol,
433 // ordering, synchscope]
434 FUNC_CODE_INST_STOREATOMIC_OLD = 42, // STORE: [ptrty,ptr,val, align, vol
435 // ordering, synchscope]
436 FUNC_CODE_INST_GEP = 43, // GEP: [inbounds, n x operands]
437 FUNC_CODE_INST_STORE = 44, // STORE: [ptrty,ptr,valty,val, align, vol]
438 FUNC_CODE_INST_STOREATOMIC = 45, // STORE: [ptrty,ptr,val, align, vol
439 FUNC_CODE_INST_CMPXCHG = 46, // CMPXCHG: [ptrty,ptr,valty,cmp,new, align,
440 // vol,ordering,synchscope]
441 FUNC_CODE_INST_LANDINGPAD = 47, // LANDINGPAD: [ty,val,num,id0,val0...]
442 FUNC_CODE_INST_CLEANUPRET = 48, // CLEANUPRET: [val] or [val,bb#]
443 FUNC_CODE_INST_CATCHRET = 49, // CATCHRET: [val,bb#]
444 FUNC_CODE_INST_CATCHPAD = 50, // CATCHPAD: [bb#,bb#,num,args...]
445 FUNC_CODE_INST_CLEANUPPAD = 51, // CLEANUPPAD: [num,args...]
446 FUNC_CODE_INST_CATCHSWITCH = 52, // CATCHSWITCH: [num,args...] or [num,args...,bb]
447 // 53 is unused.
448 // 54 is unused.
449 FUNC_CODE_OPERAND_BUNDLE = 55, // OPERAND_BUNDLE: [tag#, value...]
450 };
451
452 enum UseListCodes {
453 USELIST_CODE_DEFAULT = 1, // DEFAULT: [index..., value-id]
454 USELIST_CODE_BB = 2 // BB: [index..., bb-id]
455 };
456
457 enum AttributeKindCodes {
458 // = 0 is unused
459 ATTR_KIND_ALIGNMENT = 1,
460 ATTR_KIND_ALWAYS_INLINE = 2,
461 ATTR_KIND_BY_VAL = 3,
462 ATTR_KIND_INLINE_HINT = 4,
463 ATTR_KIND_IN_REG = 5,
464 ATTR_KIND_MIN_SIZE = 6,
465 ATTR_KIND_NAKED = 7,
466 ATTR_KIND_NEST = 8,
467 ATTR_KIND_NO_ALIAS = 9,
468 ATTR_KIND_NO_BUILTIN = 10,
469 ATTR_KIND_NO_CAPTURE = 11,
470 ATTR_KIND_NO_DUPLICATE = 12,
471 ATTR_KIND_NO_IMPLICIT_FLOAT = 13,
472 ATTR_KIND_NO_INLINE = 14,
473 ATTR_KIND_NON_LAZY_BIND = 15,
474 ATTR_KIND_NO_RED_ZONE = 16,
475 ATTR_KIND_NO_RETURN = 17,
476 ATTR_KIND_NO_UNWIND = 18,
477 ATTR_KIND_OPTIMIZE_FOR_SIZE = 19,
478 ATTR_KIND_READ_NONE = 20,
479 ATTR_KIND_READ_ONLY = 21,
480 ATTR_KIND_RETURNED = 22,
481 ATTR_KIND_RETURNS_TWICE = 23,
482 ATTR_KIND_S_EXT = 24,
483 ATTR_KIND_STACK_ALIGNMENT = 25,
484 ATTR_KIND_STACK_PROTECT = 26,
485 ATTR_KIND_STACK_PROTECT_REQ = 27,
486 ATTR_KIND_STACK_PROTECT_STRONG = 28,
487 ATTR_KIND_STRUCT_RET = 29,
488 ATTR_KIND_SANITIZE_ADDRESS = 30,
489 ATTR_KIND_SANITIZE_THREAD = 31,
490 ATTR_KIND_SANITIZE_MEMORY = 32,
491 ATTR_KIND_UW_TABLE = 33,
492 ATTR_KIND_Z_EXT = 34,
493 ATTR_KIND_BUILTIN = 35,
494 ATTR_KIND_COLD = 36,
495 ATTR_KIND_OPTIMIZE_NONE = 37,
496 ATTR_KIND_IN_ALLOCA = 38,
497 ATTR_KIND_NON_NULL = 39,
498 ATTR_KIND_JUMP_TABLE = 40,
499 ATTR_KIND_DEREFERENCEABLE = 41,
500 ATTR_KIND_DEREFERENCEABLE_OR_NULL = 42,
501 ATTR_KIND_CONVERGENT = 43,
502 ATTR_KIND_SAFESTACK = 44,
503 ATTR_KIND_ARGMEMONLY = 45,
504 ATTR_KIND_SWIFT_SELF = 46,
505 ATTR_KIND_SWIFT_ERROR = 47,
506 ATTR_KIND_NO_RECURSE = 48,
507 ATTR_KIND_INACCESSIBLEMEM_ONLY = 49,
508 ATTR_KIND_INACCESSIBLEMEM_OR_ARGMEMONLY = 50
509 };
510
511 enum ComdatSelectionKindCodes {
512 COMDAT_SELECTION_KIND_ANY = 1,
513 COMDAT_SELECTION_KIND_EXACT_MATCH = 2,
514 COMDAT_SELECTION_KIND_LARGEST = 3,
515 COMDAT_SELECTION_KIND_NO_DUPLICATES = 4,
516 COMDAT_SELECTION_KIND_SAME_SIZE = 5,
517 };
72 /// MODULE blocks have a number of optional fields and subblocks.
73 enum ModuleCodes {
74 MODULE_CODE_VERSION = 1, // VERSION: [version#]
75 MODULE_CODE_TRIPLE = 2, // TRIPLE: [strchr x N]
76 MODULE_CODE_DATALAYOUT = 3, // DATALAYOUT: [strchr x N]
77 MODULE_CODE_ASM = 4, // ASM: [strchr x N]
78 MODULE_CODE_SECTIONNAME = 5, // SECTIONNAME: [strchr x N]
79
80 // FIXME: Remove DEPLIB in 4.0.
81 MODULE_CODE_DEPLIB = 6, // DEPLIB: [strchr x N]
82
83 // GLOBALVAR: [pointer type, isconst, initid,
84 // linkage, alignment, section, visibility, threadlocal]
85 MODULE_CODE_GLOBALVAR = 7,
86
87 // FUNCTION: [type, callingconv, isproto, linkage, paramattrs, alignment,
88 // section, visibility, gc, unnamed_addr]
89 MODULE_CODE_FUNCTION = 8,
90
91 // ALIAS: [alias type, aliasee val#, linkage, visibility]
92 MODULE_CODE_ALIAS_OLD = 9,
93
94 // MODULE_CODE_PURGEVALS: [numvals]
95 MODULE_CODE_PURGEVALS = 10,
96
97 MODULE_CODE_GCNAME = 11, // GCNAME: [strchr x N]
98 MODULE_CODE_COMDAT = 12, // COMDAT: [selection_kind, name]
99
100 MODULE_CODE_VSTOFFSET = 13, // VSTOFFSET: [offset]
101
102 // ALIAS: [alias value type, addrspace, aliasee val#, linkage, visibility]
103 MODULE_CODE_ALIAS = 14,
104
105 MODULE_CODE_METADATA_VALUES_UNUSED = 15,
106
107 // SOURCE_FILENAME: [namechar x N]
108 MODULE_CODE_SOURCE_FILENAME = 16,
109 };
110
111 /// PARAMATTR blocks have code for defining a parameter attribute set.
112 enum AttributeCodes {
113 // FIXME: Remove `PARAMATTR_CODE_ENTRY_OLD' in 4.0
114 PARAMATTR_CODE_ENTRY_OLD = 1, // ENTRY: [paramidx0, attr0,
115 // paramidx1, attr1...]
116 PARAMATTR_CODE_ENTRY = 2, // ENTRY: [paramidx0, attrgrp0,
117 // paramidx1, attrgrp1, ...]
118 PARAMATTR_GRP_CODE_ENTRY = 3 // ENTRY: [id, attr0, att1, ...]
119 };
120
121 /// TYPE blocks have codes for each type primitive they use.
122 enum TypeCodes {
123 TYPE_CODE_NUMENTRY = 1, // NUMENTRY: [numentries]
124
125 // Type Codes
126 TYPE_CODE_VOID = 2, // VOID
127 TYPE_CODE_FLOAT = 3, // FLOAT
128 TYPE_CODE_DOUBLE = 4, // DOUBLE
129 TYPE_CODE_LABEL = 5, // LABEL
130 TYPE_CODE_OPAQUE = 6, // OPAQUE
131 TYPE_CODE_INTEGER = 7, // INTEGER: [width]
132 TYPE_CODE_POINTER = 8, // POINTER: [pointee type]
133
134 TYPE_CODE_FUNCTION_OLD = 9, // FUNCTION: [vararg, attrid, retty,
135 // paramty x N]
136
137 TYPE_CODE_HALF = 10, // HALF
138
139 TYPE_CODE_ARRAY = 11, // ARRAY: [numelts, eltty]
140 TYPE_CODE_VECTOR = 12, // VECTOR: [numelts, eltty]
141
142 // These are not with the other floating point types because they're
143 // a late addition, and putting them in the right place breaks
144 // binary compatibility.
145 TYPE_CODE_X86_FP80 = 13, // X86 LONG DOUBLE
146 TYPE_CODE_FP128 = 14, // LONG DOUBLE (112 bit mantissa)
147 TYPE_CODE_PPC_FP128 = 15, // PPC LONG DOUBLE (2 doubles)
148
149 TYPE_CODE_METADATA = 16, // METADATA
150
151 TYPE_CODE_X86_MMX = 17, // X86 MMX
152
153 TYPE_CODE_STRUCT_ANON = 18, // STRUCT_ANON: [ispacked, eltty x N]
154 TYPE_CODE_STRUCT_NAME = 19, // STRUCT_NAME: [strchr x N]
155 TYPE_CODE_STRUCT_NAMED = 20, // STRUCT_NAMED: [ispacked, eltty x N]
156
157 TYPE_CODE_FUNCTION = 21, // FUNCTION: [vararg, retty, paramty x N]
158
159 TYPE_CODE_TOKEN = 22 // TOKEN
160 };
161
162 enum OperandBundleTagCode {
163 OPERAND_BUNDLE_TAG = 1, // TAG: [strchr x N]
164 };
165
166 // The type symbol table only has one code (TST_ENTRY_CODE).
167 enum TypeSymtabCodes {
168 TST_CODE_ENTRY = 1 // TST_ENTRY: [typeid, namechar x N]
169 };
170
171 // Value symbol table codes.
172 enum ValueSymtabCodes {
173 VST_CODE_ENTRY = 1, // VST_ENTRY: [valueid, namechar x N]
174 VST_CODE_BBENTRY = 2, // VST_BBENTRY: [bbid, namechar x N]
175 VST_CODE_FNENTRY = 3, // VST_FNENTRY: [valueid, offset, namechar x N]
176 // VST_COMBINED_GVDEFENTRY: [valueid, sumoffset, guid]
177 VST_CODE_COMBINED_GVDEFENTRY = 4,
178 // VST_COMBINED_ENTRY: [valueid, refguid]
179 VST_CODE_COMBINED_ENTRY = 5
180 };
181
182 // The module path symbol table only has one code (MST_CODE_ENTRY).
183 enum ModulePathSymtabCodes {
184 MST_CODE_ENTRY = 1, // MST_ENTRY: [modid, namechar x N]
185 };
186
187 // The summary section uses different codes in the per-module
188 // and combined index cases.
189 enum GlobalValueSummarySymtabCodes {
190 // PERMODULE: [valueid, linkage, instcount, numrefs, numrefs x valueid,
191 // n x (valueid, callsitecount)]
192 FS_PERMODULE = 1,
193 // PERMODULE_PROFILE: [valueid, linkage, instcount, numrefs,
194 // numrefs x valueid,
195 // n x (valueid, callsitecount, profilecount)]
196 FS_PERMODULE_PROFILE = 2,
197 // PERMODULE_GLOBALVAR_INIT_REFS: [valueid, linkage, n x valueid]
198 FS_PERMODULE_GLOBALVAR_INIT_REFS = 3,
199 // COMBINED: [modid, linkage, instcount, numrefs, numrefs x valueid,
200 // n x (valueid, callsitecount)]
201 FS_COMBINED = 4,
202 // COMBINED_PROFILE: [modid, linkage, instcount, numrefs,
203 // numrefs x valueid,
204 // n x (valueid, callsitecount, profilecount)]
205 FS_COMBINED_PROFILE = 5,
206 // COMBINED_GLOBALVAR_INIT_REFS: [modid, linkage, n x valueid]
207 FS_COMBINED_GLOBALVAR_INIT_REFS = 6,
208 };
209
210 enum MetadataCodes {
211 METADATA_STRING_OLD = 1, // MDSTRING: [values]
212 METADATA_VALUE = 2, // VALUE: [type num, value num]
213 METADATA_NODE = 3, // NODE: [n x md num]
214 METADATA_NAME = 4, // STRING: [values]
215 METADATA_DISTINCT_NODE = 5, // DISTINCT_NODE: [n x md num]
216 METADATA_KIND = 6, // [n x [id, name]]
217 METADATA_LOCATION = 7, // [distinct, line, col, scope, inlined-at?]
218 METADATA_OLD_NODE = 8, // OLD_NODE: [n x (type num, value num)]
219 METADATA_OLD_FN_NODE = 9, // OLD_FN_NODE: [n x (type num, value num)]
220 METADATA_NAMED_NODE = 10, // NAMED_NODE: [n x mdnodes]
221 METADATA_ATTACHMENT = 11, // [m x [value, [n x [id, mdnode]]]
222 METADATA_GENERIC_DEBUG = 12, // [distinct, tag, vers, header, n x md num]
223 METADATA_SUBRANGE = 13, // [distinct, count, lo]
224 METADATA_ENUMERATOR = 14, // [distinct, value, name]
225 METADATA_BASIC_TYPE = 15, // [distinct, tag, name, size, align, enc]
226 METADATA_FILE = 16, // [distinct, filename, directory]
227 METADATA_DERIVED_TYPE = 17, // [distinct, ...]
228 METADATA_COMPOSITE_TYPE = 18, // [distinct, ...]
229 METADATA_SUBROUTINE_TYPE = 19, // [distinct, flags, types]
230 METADATA_COMPILE_UNIT = 20, // [distinct, ...]
231 METADATA_SUBPROGRAM = 21, // [distinct, ...]
232 METADATA_LEXICAL_BLOCK = 22, // [distinct, scope, file, line, column]
233 METADATA_LEXICAL_BLOCK_FILE = 23, //[distinct, scope, file, discriminator]
234 METADATA_NAMESPACE = 24, // [distinct, scope, file, name, line]
235 METADATA_TEMPLATE_TYPE = 25, // [distinct, scope, name, type, ...]
236 METADATA_TEMPLATE_VALUE = 26, // [distinct, scope, name, type, value, ...]
237 METADATA_GLOBAL_VAR = 27, // [distinct, ...]
238 METADATA_LOCAL_VAR = 28, // [distinct, ...]
239 METADATA_EXPRESSION = 29, // [distinct, n x element]
240 METADATA_OBJC_PROPERTY = 30, // [distinct, name, file, line, ...]
241 METADATA_IMPORTED_ENTITY = 31, // [distinct, tag, scope, entity, line, name]
242 METADATA_MODULE = 32, // [distinct, scope, name, ...]
243 METADATA_MACRO = 33, // [distinct, macinfo, line, name, value]
244 METADATA_MACRO_FILE = 34, // [distinct, macinfo, line, file, ...]
245 METADATA_STRINGS = 35, // [count, offset] blob([lengths][chars])
246 };
247
248 // The constants block (CONSTANTS_BLOCK_ID) describes emission for each
249 // constant and maintains an implicit current type value.
250 enum ConstantsCodes {
251 CST_CODE_SETTYPE = 1, // SETTYPE: [typeid]
252 CST_CODE_NULL = 2, // NULL
253 CST_CODE_UNDEF = 3, // UNDEF
254 CST_CODE_INTEGER = 4, // INTEGER: [intval]
255 CST_CODE_WIDE_INTEGER = 5, // WIDE_INTEGER: [n x intval]
256 CST_CODE_FLOAT = 6, // FLOAT: [fpval]
257 CST_CODE_AGGREGATE = 7, // AGGREGATE: [n x value number]
258 CST_CODE_STRING = 8, // STRING: [values]
259 CST_CODE_CSTRING = 9, // CSTRING: [values]
260 CST_CODE_CE_BINOP = 10, // CE_BINOP: [opcode, opval, opval]
261 CST_CODE_CE_CAST = 11, // CE_CAST: [opcode, opty, opval]
262 CST_CODE_CE_GEP = 12, // CE_GEP: [n x operands]
263 CST_CODE_CE_SELECT = 13, // CE_SELECT: [opval, opval, opval]
264 CST_CODE_CE_EXTRACTELT = 14, // CE_EXTRACTELT: [opty, opval, opval]
265 CST_CODE_CE_INSERTELT = 15, // CE_INSERTELT: [opval, opval, opval]
266 CST_CODE_CE_SHUFFLEVEC = 16, // CE_SHUFFLEVEC: [opval, opval, opval]
267 CST_CODE_CE_CMP = 17, // CE_CMP: [opty, opval, opval, pred]
268 CST_CODE_INLINEASM_OLD = 18, // INLINEASM: [sideeffect|alignstack,
269 // asmstr,conststr]
270 CST_CODE_CE_SHUFVEC_EX = 19, // SHUFVEC_EX: [opty, opval, opval, opval]
271 CST_CODE_CE_INBOUNDS_GEP = 20, // INBOUNDS_GEP: [n x operands]
272 CST_CODE_BLOCKADDRESS = 21, // CST_CODE_BLOCKADDRESS [fnty, fnval, bb#]
273 CST_CODE_DATA = 22, // DATA: [n x elements]
274 CST_CODE_INLINEASM = 23 // INLINEASM: [sideeffect|alignstack|
275 // asmdialect,asmstr,conststr]
276 };
277
278 /// CastOpcodes - These are values used in the bitcode files to encode which
279 /// cast a CST_CODE_CE_CAST or a XXX refers to. The values of these enums
280 /// have no fixed relation to the LLVM IR enum values. Changing these will
281 /// break compatibility with old files.
282 enum CastOpcodes {
283 CAST_TRUNC = 0,
284 CAST_ZEXT = 1,
285 CAST_SEXT = 2,
286 CAST_FPTOUI = 3,
287 CAST_FPTOSI = 4,
288 CAST_UITOFP = 5,
289 CAST_SITOFP = 6,
290 CAST_FPTRUNC = 7,
291 CAST_FPEXT = 8,
292 CAST_PTRTOINT = 9,
293 CAST_INTTOPTR = 10,
294 CAST_BITCAST = 11,
295 CAST_ADDRSPACECAST = 12
296 };
297
298 /// BinaryOpcodes - These are values used in the bitcode files to encode which
299 /// binop a CST_CODE_CE_BINOP or a XXX refers to. The values of these enums
300 /// have no fixed relation to the LLVM IR enum values. Changing these will
301 /// break compatibility with old files.
302 enum BinaryOpcodes {
303 BINOP_ADD = 0,
304 BINOP_SUB = 1,
305 BINOP_MUL = 2,
306 BINOP_UDIV = 3,
307 BINOP_SDIV = 4, // overloaded for FP
308 BINOP_UREM = 5,
309 BINOP_SREM = 6, // overloaded for FP
310 BINOP_SHL = 7,
311 BINOP_LSHR = 8,
312 BINOP_ASHR = 9,
313 BINOP_AND = 10,
314 BINOP_OR = 11,
315 BINOP_XOR = 12
316 };
317
318 /// These are values used in the bitcode files to encode AtomicRMW operations.
319 /// The values of these enums have no fixed relation to the LLVM IR enum
320 /// values. Changing these will break compatibility with old files.
321 enum RMWOperations {
322 RMW_XCHG = 0,
323 RMW_ADD = 1,
324 RMW_SUB = 2,
325 RMW_AND = 3,
326 RMW_NAND = 4,
327 RMW_OR = 5,
328 RMW_XOR = 6,
329 RMW_MAX = 7,
330 RMW_MIN = 8,
331 RMW_UMAX = 9,
332 RMW_UMIN = 10
333 };
334
335 /// OverflowingBinaryOperatorOptionalFlags - Flags for serializing
336 /// OverflowingBinaryOperator's SubclassOptionalData contents.
337 enum OverflowingBinaryOperatorOptionalFlags {
338 OBO_NO_UNSIGNED_WRAP = 0,
339 OBO_NO_SIGNED_WRAP = 1
340 };
341
342 /// PossiblyExactOperatorOptionalFlags - Flags for serializing
343 /// PossiblyExactOperator's SubclassOptionalData contents.
344 enum PossiblyExactOperatorOptionalFlags { PEO_EXACT = 0 };
345
346 /// Encoded AtomicOrdering values.
347 enum AtomicOrderingCodes {
348 ORDERING_NOTATOMIC = 0,
349 ORDERING_UNORDERED = 1,
350 ORDERING_MONOTONIC = 2,
351 ORDERING_ACQUIRE = 3,
352 ORDERING_RELEASE = 4,
353 ORDERING_ACQREL = 5,
354 ORDERING_SEQCST = 6
355 };
356
357 /// Encoded SynchronizationScope values.
358 enum AtomicSynchScopeCodes {
359 SYNCHSCOPE_SINGLETHREAD = 0,
360 SYNCHSCOPE_CROSSTHREAD = 1
361 };
362
363 /// Markers and flags for call instruction.
364 enum CallMarkersFlags {
365 CALL_TAIL = 0,
366 CALL_CCONV = 1,
367 CALL_MUSTTAIL = 14,
368 CALL_EXPLICIT_TYPE = 15,
369 CALL_NOTAIL = 16,
370 CALL_FMF = 17 // Call has optional fast-math-flags.
371 };
372
373 // The function body block (FUNCTION_BLOCK_ID) describes function bodies. It
374 // can contain a constant block (CONSTANTS_BLOCK_ID).
375 enum FunctionCodes {
376 FUNC_CODE_DECLAREBLOCKS = 1, // DECLAREBLOCKS: [n]
377
378 FUNC_CODE_INST_BINOP = 2, // BINOP: [opcode, ty, opval, opval]
379 FUNC_CODE_INST_CAST = 3, // CAST: [opcode, ty, opty, opval]
380 FUNC_CODE_INST_GEP_OLD = 4, // GEP: [n x operands]
381 FUNC_CODE_INST_SELECT = 5, // SELECT: [ty, opval, opval, opval]
382 FUNC_CODE_INST_EXTRACTELT = 6, // EXTRACTELT: [opty, opval, opval]
383 FUNC_CODE_INST_INSERTELT = 7, // INSERTELT: [ty, opval, opval, opval]
384 FUNC_CODE_INST_SHUFFLEVEC = 8, // SHUFFLEVEC: [ty, opval, opval, opval]
385 FUNC_CODE_INST_CMP = 9, // CMP: [opty, opval, opval, pred]
386
387 FUNC_CODE_INST_RET = 10, // RET: [opty,opval]
388 FUNC_CODE_INST_BR = 11, // BR: [bb#, bb#, cond] or [bb#]
389 FUNC_CODE_INST_SWITCH = 12, // SWITCH: [opty, op0, op1, ...]
390 FUNC_CODE_INST_INVOKE = 13, // INVOKE: [attr, fnty, op0,op1, ...]
391 // 14 is unused.
392 FUNC_CODE_INST_UNREACHABLE = 15, // UNREACHABLE
393
394 FUNC_CODE_INST_PHI = 16, // PHI: [ty, val0,bb0, ...]
395 // 17 is unused.
396 // 18 is unused.
397 FUNC_CODE_INST_ALLOCA = 19, // ALLOCA: [instty, opty, op, align]
398 FUNC_CODE_INST_LOAD = 20, // LOAD: [opty, op, align, vol]
399 // 21 is unused.
400 // 22 is unused.
401 FUNC_CODE_INST_VAARG = 23, // VAARG: [valistty, valist, instty]
402 // This store code encodes the pointer type, rather than the value type
403 // this is so information only available in the pointer type (e.g. address
404 // spaces) is retained.
405 FUNC_CODE_INST_STORE_OLD = 24, // STORE: [ptrty,ptr,val, align, vol]
406 // 25 is unused.
407 FUNC_CODE_INST_EXTRACTVAL = 26, // EXTRACTVAL: [n x operands]
408 FUNC_CODE_INST_INSERTVAL = 27, // INSERTVAL: [n x operands]
409 // fcmp/icmp returning Int1TY or vector of Int1Ty. Same as CMP, exists to
410 // support legacy vicmp/vfcmp instructions.
411 FUNC_CODE_INST_CMP2 = 28, // CMP2: [opty, opval, opval, pred]
412 // new select on i1 or [N x i1]
413 FUNC_CODE_INST_VSELECT = 29, // VSELECT: [ty,opval,opval,predty,pred]
414 FUNC_CODE_INST_INBOUNDS_GEP_OLD = 30, // INBOUNDS_GEP: [n x operands]
415 FUNC_CODE_INST_INDIRECTBR = 31, // INDIRECTBR: [opty, op0, op1, ...]
416 // 32 is unused.
417 FUNC_CODE_DEBUG_LOC_AGAIN = 33, // DEBUG_LOC_AGAIN
418
419 FUNC_CODE_INST_CALL = 34, // CALL: [attr, cc, fnty, fnid, args...]
420
421 FUNC_CODE_DEBUG_LOC = 35, // DEBUG_LOC: [Line,Col,ScopeVal, IAVal]
422 FUNC_CODE_INST_FENCE = 36, // FENCE: [ordering, synchscope]
423 FUNC_CODE_INST_CMPXCHG_OLD = 37, // CMPXCHG: [ptrty,ptr,cmp,new, align, vol,
424 // ordering, synchscope]
425 FUNC_CODE_INST_ATOMICRMW = 38, // ATOMICRMW: [ptrty,ptr,val, operation,
426 // align, vol,
427 // ordering, synchscope]
428 FUNC_CODE_INST_RESUME = 39, // RESUME: [opval]
429 FUNC_CODE_INST_LANDINGPAD_OLD =
430 40, // LANDINGPAD: [ty,val,val,num,id0,val0...]
431 FUNC_CODE_INST_LOADATOMIC = 41, // LOAD: [opty, op, align, vol,
432 // ordering, synchscope]
433 FUNC_CODE_INST_STOREATOMIC_OLD = 42, // STORE: [ptrty,ptr,val, align, vol
434 // ordering, synchscope]
435 FUNC_CODE_INST_GEP = 43, // GEP: [inbounds, n x operands]
436 FUNC_CODE_INST_STORE = 44, // STORE: [ptrty,ptr,valty,val, align, vol]
437 FUNC_CODE_INST_STOREATOMIC = 45, // STORE: [ptrty,ptr,val, align, vol
438 FUNC_CODE_INST_CMPXCHG = 46, // CMPXCHG: [ptrty,ptr,valty,cmp,new, align,
439 // vol,ordering,synchscope]
440 FUNC_CODE_INST_LANDINGPAD = 47, // LANDINGPAD: [ty,val,num,id0,val0...]
441 FUNC_CODE_INST_CLEANUPRET = 48, // CLEANUPRET: [val] or [val,bb#]
442 FUNC_CODE_INST_CATCHRET = 49, // CATCHRET: [val,bb#]
443 FUNC_CODE_INST_CATCHPAD = 50, // CATCHPAD: [bb#,bb#,num,args...]
444 FUNC_CODE_INST_CLEANUPPAD = 51, // CLEANUPPAD: [num,args...]
445 FUNC_CODE_INST_CATCHSWITCH =
446 52, // CATCHSWITCH: [num,args...] or [num,args...,bb]
447 // 53 is unused.
448 // 54 is unused.
449 FUNC_CODE_OPERAND_BUNDLE = 55, // OPERAND_BUNDLE: [tag#, value...]
450 };
451
452 enum UseListCodes {
453 USELIST_CODE_DEFAULT = 1, // DEFAULT: [index..., value-id]
454 USELIST_CODE_BB = 2 // BB: [index..., bb-id]
455 };
456
457 enum AttributeKindCodes {
458 // = 0 is unused
459 ATTR_KIND_ALIGNMENT = 1,
460 ATTR_KIND_ALWAYS_INLINE = 2,
461 ATTR_KIND_BY_VAL = 3,
462 ATTR_KIND_INLINE_HINT = 4,
463 ATTR_KIND_IN_REG = 5,
464 ATTR_KIND_MIN_SIZE = 6,
465 ATTR_KIND_NAKED = 7,
466 ATTR_KIND_NEST = 8,
467 ATTR_KIND_NO_ALIAS = 9,
468 ATTR_KIND_NO_BUILTIN = 10,
469 ATTR_KIND_NO_CAPTURE = 11,
470 ATTR_KIND_NO_DUPLICATE = 12,
471 ATTR_KIND_NO_IMPLICIT_FLOAT = 13,
472 ATTR_KIND_NO_INLINE = 14,
473 ATTR_KIND_NON_LAZY_BIND = 15,
474 ATTR_KIND_NO_RED_ZONE = 16,
475 ATTR_KIND_NO_RETURN = 17,
476 ATTR_KIND_NO_UNWIND = 18,
477 ATTR_KIND_OPTIMIZE_FOR_SIZE = 19,
478 ATTR_KIND_READ_NONE = 20,
479 ATTR_KIND_READ_ONLY = 21,
480 ATTR_KIND_RETURNED = 22,
481 ATTR_KIND_RETURNS_TWICE = 23,
482 ATTR_KIND_S_EXT = 24,
483 ATTR_KIND_STACK_ALIGNMENT = 25,
484 ATTR_KIND_STACK_PROTECT = 26,
485 ATTR_KIND_STACK_PROTECT_REQ = 27,
486 ATTR_KIND_STACK_PROTECT_STRONG = 28,
487 ATTR_KIND_STRUCT_RET = 29,
488 ATTR_KIND_SANITIZE_ADDRESS = 30,
489 ATTR_KIND_SANITIZE_THREAD = 31,
490 ATTR_KIND_SANITIZE_MEMORY = 32,
491 ATTR_KIND_UW_TABLE = 33,
492 ATTR_KIND_Z_EXT = 34,
493 ATTR_KIND_BUILTIN = 35,
494 ATTR_KIND_COLD = 36,
495 ATTR_KIND_OPTIMIZE_NONE = 37,
496 ATTR_KIND_IN_ALLOCA = 38,
497 ATTR_KIND_NON_NULL = 39,
498 ATTR_KIND_JUMP_TABLE = 40,
499 ATTR_KIND_DEREFERENCEABLE = 41,
500 ATTR_KIND_DEREFERENCEABLE_OR_NULL = 42,
501 ATTR_KIND_CONVERGENT = 43,
502 ATTR_KIND_SAFESTACK = 44,
503 ATTR_KIND_ARGMEMONLY = 45,
504 ATTR_KIND_SWIFT_SELF = 46,
505 ATTR_KIND_SWIFT_ERROR = 47,
506 ATTR_KIND_NO_RECURSE = 48,
507 ATTR_KIND_INACCESSIBLEMEM_ONLY = 49,
508 ATTR_KIND_INACCESSIBLEMEM_OR_ARGMEMONLY = 50
509 };
510
511 enum ComdatSelectionKindCodes {
512 COMDAT_SELECTION_KIND_ANY = 1,
513 COMDAT_SELECTION_KIND_EXACT_MATCH = 2,
514 COMDAT_SELECTION_KIND_LARGEST = 3,
515 COMDAT_SELECTION_KIND_NO_DUPLICATES = 4,
516 COMDAT_SELECTION_KIND_SAME_SIZE = 5,
517 };
518518
519519 } // End bitc namespace
520520 } // End llvm namespace