Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:43:20

0001 //===- LLToken.h - Token Codes for LLVM Assembly Files ----------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // This file defines the enums for the .ll lexer.
0010 //
0011 //===----------------------------------------------------------------------===//
0012 
0013 #ifndef LLVM_ASMPARSER_LLTOKEN_H
0014 #define LLVM_ASMPARSER_LLTOKEN_H
0015 
0016 namespace llvm {
0017 namespace lltok {
0018 enum Kind {
0019   // Markers
0020   Eof,
0021   Error,
0022 
0023   // Tokens with no info.
0024   dotdotdot, // ...
0025   equal,
0026   comma, // =  ,
0027   star,  // *
0028   lsquare,
0029   rsquare, // [  ]
0030   lbrace,
0031   rbrace, // {  }
0032   less,
0033   greater, // <  >
0034   lparen,
0035   rparen,  // (  )
0036   exclaim, // !
0037   bar,     // |
0038   colon,   // :
0039   hash,    // #
0040 
0041   kw_vscale,
0042   kw_x,
0043   kw_true,
0044   kw_false,
0045   kw_declare,
0046   kw_define,
0047   kw_global,
0048   kw_constant,
0049 
0050   kw_dso_local,
0051   kw_dso_preemptable,
0052 
0053   kw_private,
0054   kw_internal,
0055   kw_linkonce,
0056   kw_linkonce_odr,
0057   kw_weak, // Used as a linkage, and a modifier for "cmpxchg".
0058   kw_weak_odr,
0059   kw_appending,
0060   kw_dllimport,
0061   kw_dllexport,
0062   kw_common,
0063   kw_available_externally,
0064   kw_default,
0065   kw_hidden,
0066   kw_protected,
0067   kw_unnamed_addr,
0068   kw_local_unnamed_addr,
0069   kw_externally_initialized,
0070   kw_extern_weak,
0071   kw_external,
0072   kw_thread_local,
0073   kw_localdynamic,
0074   kw_initialexec,
0075   kw_localexec,
0076   kw_zeroinitializer,
0077   kw_undef,
0078   kw_poison,
0079   kw_null,
0080   kw_none,
0081   kw_to,
0082   kw_caller,
0083   kw_within,
0084   kw_from,
0085   kw_tail,
0086   kw_musttail,
0087   kw_notail,
0088   kw_target,
0089   kw_triple,
0090   kw_source_filename,
0091   kw_unwind,
0092   kw_datalayout,
0093   kw_volatile,
0094   kw_atomic,
0095   kw_unordered,
0096   kw_monotonic,
0097   kw_acquire,
0098   kw_release,
0099   kw_acq_rel,
0100   kw_seq_cst,
0101   kw_syncscope,
0102   kw_nnan,
0103   kw_ninf,
0104   kw_nsz,
0105   kw_arcp,
0106   kw_contract,
0107   kw_reassoc,
0108   kw_afn,
0109   kw_fast,
0110   kw_nuw,
0111   kw_nsw,
0112   kw_nusw,
0113   kw_exact,
0114   kw_disjoint,
0115   kw_inbounds,
0116   kw_nneg,
0117   kw_samesign,
0118   kw_inrange,
0119   kw_addrspace,
0120   kw_section,
0121   kw_partition,
0122   kw_code_model,
0123   kw_alias,
0124   kw_ifunc,
0125   kw_module,
0126   kw_asm,
0127   kw_sideeffect,
0128   kw_inteldialect,
0129   kw_gc,
0130   kw_prefix,
0131   kw_prologue,
0132   kw_c,
0133 
0134   kw_cc,
0135   kw_ccc,
0136   kw_fastcc,
0137   kw_coldcc,
0138   kw_intel_ocl_bicc,
0139   kw_cfguard_checkcc,
0140   kw_x86_stdcallcc,
0141   kw_x86_fastcallcc,
0142   kw_x86_thiscallcc,
0143   kw_x86_vectorcallcc,
0144   kw_x86_regcallcc,
0145   kw_arm_apcscc,
0146   kw_arm_aapcscc,
0147   kw_arm_aapcs_vfpcc,
0148   kw_aarch64_vector_pcs,
0149   kw_aarch64_sve_vector_pcs,
0150   kw_aarch64_sme_preservemost_from_x0,
0151   kw_aarch64_sme_preservemost_from_x1,
0152   kw_aarch64_sme_preservemost_from_x2,
0153   kw_msp430_intrcc,
0154   kw_avr_intrcc,
0155   kw_avr_signalcc,
0156   kw_ptx_kernel,
0157   kw_ptx_device,
0158   kw_spir_kernel,
0159   kw_spir_func,
0160   kw_x86_64_sysvcc,
0161   kw_win64cc,
0162   kw_anyregcc,
0163   kw_swiftcc,
0164   kw_swifttailcc,
0165   kw_preserve_mostcc,
0166   kw_preserve_allcc,
0167   kw_preserve_nonecc,
0168   kw_ghccc,
0169   kw_x86_intrcc,
0170   kw_hhvmcc,
0171   kw_hhvm_ccc,
0172   kw_cxx_fast_tlscc,
0173   kw_amdgpu_vs,
0174   kw_amdgpu_ls,
0175   kw_amdgpu_hs,
0176   kw_amdgpu_es,
0177   kw_amdgpu_gs,
0178   kw_amdgpu_ps,
0179   kw_amdgpu_cs,
0180   kw_amdgpu_cs_chain,
0181   kw_amdgpu_cs_chain_preserve,
0182   kw_amdgpu_kernel,
0183   kw_amdgpu_gfx,
0184   kw_tailcc,
0185   kw_m68k_rtdcc,
0186   kw_graalcc,
0187   kw_riscv_vector_cc,
0188 
0189   // Attributes:
0190   kw_attributes,
0191   kw_sync,
0192   kw_async,
0193 #define GET_ATTR_NAMES
0194 #define ATTRIBUTE_ENUM(ENUM_NAME, DISPLAY_NAME) \
0195   kw_##DISPLAY_NAME,
0196 #include "llvm/IR/Attributes.inc"
0197 
0198   // Memory attribute:
0199   kw_read,
0200   kw_write,
0201   kw_readwrite,
0202   kw_argmem,
0203   kw_inaccessiblemem,
0204 
0205   // Legacy memory attributes:
0206   kw_argmemonly,
0207   kw_inaccessiblememonly,
0208   kw_inaccessiblemem_or_argmemonly,
0209 
0210   // Captures attribute:
0211   kw_address,
0212   kw_address_is_null,
0213   kw_provenance,
0214   kw_read_provenance,
0215 
0216   // nofpclass attribute:
0217   kw_all,
0218   kw_nan,
0219   kw_snan,
0220   kw_qnan,
0221   kw_inf,
0222   // kw_ninf, - already an fmf
0223   kw_pinf,
0224   kw_norm,
0225   kw_nnorm,
0226   kw_pnorm,
0227   // kw_sub,  - already an instruction
0228   kw_nsub,
0229   kw_psub,
0230   kw_zero,
0231   kw_nzero,
0232   kw_pzero,
0233 
0234   kw_type,
0235   kw_opaque,
0236 
0237   kw_comdat,
0238 
0239   // Comdat types
0240   kw_any,
0241   kw_exactmatch,
0242   kw_largest,
0243   kw_nodeduplicate,
0244   kw_samesize,
0245 
0246   kw_eq,
0247   kw_ne,
0248   kw_slt,
0249   kw_sgt,
0250   kw_sle,
0251   kw_sge,
0252   kw_ult,
0253   kw_ugt,
0254   kw_ule,
0255   kw_uge,
0256   kw_oeq,
0257   kw_one,
0258   kw_olt,
0259   kw_ogt,
0260   kw_ole,
0261   kw_oge,
0262   kw_ord,
0263   kw_uno,
0264   kw_ueq,
0265   kw_une,
0266 
0267   // atomicrmw operations that aren't also instruction keywords.
0268   kw_xchg,
0269   kw_nand,
0270   kw_max,
0271   kw_min,
0272   kw_umax,
0273   kw_umin,
0274   kw_fmax,
0275   kw_fmin,
0276   kw_uinc_wrap,
0277   kw_udec_wrap,
0278   kw_usub_cond,
0279   kw_usub_sat,
0280 
0281   // Instruction Opcodes (Opcode in UIntVal).
0282   kw_fneg,
0283   kw_add,
0284   kw_fadd,
0285   kw_sub,
0286   kw_fsub,
0287   kw_mul,
0288   kw_fmul,
0289   kw_udiv,
0290   kw_sdiv,
0291   kw_fdiv,
0292   kw_urem,
0293   kw_srem,
0294   kw_frem,
0295   kw_shl,
0296   kw_lshr,
0297   kw_ashr,
0298   kw_and,
0299   kw_or,
0300   kw_xor,
0301   kw_icmp,
0302   kw_fcmp,
0303 
0304   kw_phi,
0305   kw_call,
0306   kw_trunc,
0307   kw_zext,
0308   kw_sext,
0309   kw_fptrunc,
0310   kw_fpext,
0311   kw_uitofp,
0312   kw_sitofp,
0313   kw_fptoui,
0314   kw_fptosi,
0315   kw_inttoptr,
0316   kw_ptrtoint,
0317   kw_bitcast,
0318   kw_addrspacecast,
0319   kw_select,
0320   kw_va_arg,
0321 
0322   kw_landingpad,
0323   kw_personality,
0324   kw_cleanup,
0325   kw_catch,
0326   kw_filter,
0327 
0328   kw_ret,
0329   kw_br,
0330   kw_switch,
0331   kw_indirectbr,
0332   kw_invoke,
0333   kw_resume,
0334   kw_unreachable,
0335   kw_cleanupret,
0336   kw_catchswitch,
0337   kw_catchret,
0338   kw_catchpad,
0339   kw_cleanuppad,
0340   kw_callbr,
0341 
0342   kw_alloca,
0343   kw_load,
0344   kw_store,
0345   kw_fence,
0346   kw_cmpxchg,
0347   kw_atomicrmw,
0348   kw_getelementptr,
0349 
0350   kw_extractelement,
0351   kw_insertelement,
0352   kw_shufflevector,
0353   kw_splat,
0354   kw_extractvalue,
0355   kw_insertvalue,
0356   kw_blockaddress,
0357   kw_dso_local_equivalent,
0358   kw_no_cfi,
0359   kw_ptrauth,
0360 
0361   kw_freeze,
0362 
0363   // Metadata types.
0364   kw_distinct,
0365 
0366   // Use-list order directives.
0367   kw_uselistorder,
0368   kw_uselistorder_bb,
0369 
0370   // Summary index keywords
0371   kw_path,
0372   kw_hash,
0373   kw_gv,
0374   kw_guid,
0375   kw_name,
0376   kw_summaries,
0377   kw_flags,
0378   kw_blockcount,
0379   kw_linkage,
0380   kw_visibility,
0381   kw_notEligibleToImport,
0382   kw_live,
0383   kw_dsoLocal,
0384   kw_canAutoHide,
0385   kw_importType,
0386   kw_definition,
0387   kw_declaration,
0388   kw_function,
0389   kw_insts,
0390   kw_funcFlags,
0391   kw_readNone,
0392   kw_readOnly,
0393   kw_noRecurse,
0394   kw_returnDoesNotAlias,
0395   kw_noInline,
0396   kw_alwaysInline,
0397   kw_noUnwind,
0398   kw_mayThrow,
0399   kw_hasUnknownCall,
0400   kw_mustBeUnreachable,
0401   kw_calls,
0402   kw_callee,
0403   kw_params,
0404   kw_param,
0405   kw_hotness,
0406   kw_unknown,
0407   kw_critical,
0408   kw_relbf,
0409   kw_variable,
0410   kw_vTableFuncs,
0411   kw_virtFunc,
0412   kw_aliasee,
0413   kw_refs,
0414   kw_typeIdInfo,
0415   kw_typeTests,
0416   kw_typeTestAssumeVCalls,
0417   kw_typeCheckedLoadVCalls,
0418   kw_typeTestAssumeConstVCalls,
0419   kw_typeCheckedLoadConstVCalls,
0420   kw_vFuncId,
0421   kw_offset,
0422   kw_args,
0423   kw_typeid,
0424   kw_typeidCompatibleVTable,
0425   kw_summary,
0426   kw_typeTestRes,
0427   kw_kind,
0428   kw_unsat,
0429   kw_byteArray,
0430   kw_inline,
0431   kw_single,
0432   kw_allOnes,
0433   kw_sizeM1BitWidth,
0434   kw_alignLog2,
0435   kw_sizeM1,
0436   kw_bitMask,
0437   kw_inlineBits,
0438   kw_vcall_visibility,
0439   kw_wpdResolutions,
0440   kw_wpdRes,
0441   kw_indir,
0442   kw_singleImpl,
0443   kw_branchFunnel,
0444   kw_singleImplName,
0445   kw_resByArg,
0446   kw_byArg,
0447   kw_uniformRetVal,
0448   kw_uniqueRetVal,
0449   kw_virtualConstProp,
0450   kw_info,
0451   kw_byte,
0452   kw_bit,
0453   kw_varFlags,
0454   // The following are used by MemProf summary info.
0455   kw_callsites,
0456   kw_clones,
0457   kw_stackIds,
0458   kw_allocs,
0459   kw_versions,
0460   kw_memProf,
0461   kw_notcold,
0462 
0463   // GV's with __attribute__((no_sanitize("address"))), or things in
0464   // -fsanitize-ignorelist when built with ASan.
0465   kw_no_sanitize_address,
0466   // GV's with __attribute__((no_sanitize("hwaddress"))), or things in
0467   // -fsanitize-ignorelist when built with HWASan.
0468   kw_no_sanitize_hwaddress,
0469   // GV's where the clang++ frontend (when ASan is used) notes that this is
0470   // dynamically initialized, and thus needs ODR detection.
0471   kw_sanitize_address_dyninit,
0472 
0473   // Unsigned Valued tokens (UIntVal).
0474   LabelID,    // 42:
0475   GlobalID,   // @42
0476   LocalVarID, // %42
0477   AttrGrpID,  // #42
0478   SummaryID,  // ^42
0479 
0480   // String valued tokens (StrVal).
0481   LabelStr,         // foo:
0482   GlobalVar,        // @foo @"foo"
0483   ComdatVar,        // $foo
0484   LocalVar,         // %foo %"foo"
0485   MetadataVar,      // !foo
0486   StringConstant,   // "foo"
0487   DwarfTag,         // DW_TAG_foo
0488   DwarfAttEncoding, // DW_ATE_foo
0489   DwarfVirtuality,  // DW_VIRTUALITY_foo
0490   DwarfLang,        // DW_LANG_foo
0491   DwarfCC,          // DW_CC_foo
0492   EmissionKind,     // lineTablesOnly
0493   NameTableKind,    // GNU
0494   DwarfOp,          // DW_OP_foo
0495   DIFlag,           // DIFlagFoo
0496   DISPFlag,         // DISPFlagFoo
0497   DwarfMacinfo,     // DW_MACINFO_foo
0498   ChecksumKind,     // CSK_foo
0499   DbgRecordType,    // dbg_foo
0500 
0501   // Type valued tokens (TyVal).
0502   Type,
0503 
0504   APFloat, // APFloatVal
0505   APSInt   // APSInt
0506 };
0507 } // end namespace lltok
0508 } // end namespace llvm
0509 
0510 #endif