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