[Alignment][NFC] TargetCallingConv::setOrigAlign and TargetLowering::getABIAlignmentF...
[llvm-core.git] / lib / AsmParser / LLToken.h
blobf49feb2dc14d19726e7eeffc2b81d359bcce704d
1 //===- LLToken.h - Token Codes for LLVM Assembly Files ----------*- 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 file defines the enums for the .ll lexer.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_LIB_ASMPARSER_LLTOKEN_H
14 #define LLVM_LIB_ASMPARSER_LLTOKEN_H
16 namespace llvm {
17 namespace lltok {
18 enum Kind {
19 // Markers
20 Eof,
21 Error,
23 // Tokens with no info.
24 dotdotdot, // ...
25 equal,
26 comma, // = ,
27 star, // *
28 lsquare,
29 rsquare, // [ ]
30 lbrace,
31 rbrace, // { }
32 less,
33 greater, // < >
34 lparen,
35 rparen, // ( )
36 exclaim, // !
37 bar, // |
38 colon, // :
40 kw_vscale,
41 kw_x,
42 kw_true,
43 kw_false,
44 kw_declare,
45 kw_define,
46 kw_global,
47 kw_constant,
49 kw_dso_local,
50 kw_dso_preemptable,
52 kw_private,
53 kw_internal,
54 kw_linkonce,
55 kw_linkonce_odr,
56 kw_weak, // Used as a linkage, and a modifier for "cmpxchg".
57 kw_weak_odr,
58 kw_appending,
59 kw_dllimport,
60 kw_dllexport,
61 kw_common,
62 kw_available_externally,
63 kw_default,
64 kw_hidden,
65 kw_protected,
66 kw_unnamed_addr,
67 kw_local_unnamed_addr,
68 kw_externally_initialized,
69 kw_extern_weak,
70 kw_external,
71 kw_thread_local,
72 kw_localdynamic,
73 kw_initialexec,
74 kw_localexec,
75 kw_zeroinitializer,
76 kw_undef,
77 kw_null,
78 kw_none,
79 kw_to,
80 kw_caller,
81 kw_within,
82 kw_from,
83 kw_tail,
84 kw_musttail,
85 kw_notail,
86 kw_target,
87 kw_triple,
88 kw_source_filename,
89 kw_unwind,
90 kw_deplibs, // FIXME: Remove in 4.0
91 kw_datalayout,
92 kw_volatile,
93 kw_atomic,
94 kw_unordered,
95 kw_monotonic,
96 kw_acquire,
97 kw_release,
98 kw_acq_rel,
99 kw_seq_cst,
100 kw_syncscope,
101 kw_nnan,
102 kw_ninf,
103 kw_nsz,
104 kw_arcp,
105 kw_contract,
106 kw_reassoc,
107 kw_afn,
108 kw_fast,
109 kw_nuw,
110 kw_nsw,
111 kw_exact,
112 kw_inbounds,
113 kw_inrange,
114 kw_align,
115 kw_addrspace,
116 kw_section,
117 kw_partition,
118 kw_alias,
119 kw_ifunc,
120 kw_module,
121 kw_asm,
122 kw_sideeffect,
123 kw_alignstack,
124 kw_inteldialect,
125 kw_gc,
126 kw_prefix,
127 kw_prologue,
128 kw_c,
130 kw_cc,
131 kw_ccc,
132 kw_fastcc,
133 kw_coldcc,
134 kw_intel_ocl_bicc,
135 kw_x86_stdcallcc,
136 kw_x86_fastcallcc,
137 kw_x86_thiscallcc,
138 kw_x86_vectorcallcc,
139 kw_x86_regcallcc,
140 kw_arm_apcscc,
141 kw_arm_aapcscc,
142 kw_arm_aapcs_vfpcc,
143 kw_aarch64_vector_pcs,
144 kw_msp430_intrcc,
145 kw_avr_intrcc,
146 kw_avr_signalcc,
147 kw_ptx_kernel,
148 kw_ptx_device,
149 kw_spir_kernel,
150 kw_spir_func,
151 kw_x86_64_sysvcc,
152 kw_win64cc,
153 kw_webkit_jscc,
154 kw_anyregcc,
155 kw_swiftcc,
156 kw_preserve_mostcc,
157 kw_preserve_allcc,
158 kw_ghccc,
159 kw_x86_intrcc,
160 kw_hhvmcc,
161 kw_hhvm_ccc,
162 kw_cxx_fast_tlscc,
163 kw_amdgpu_vs,
164 kw_amdgpu_ls,
165 kw_amdgpu_hs,
166 kw_amdgpu_es,
167 kw_amdgpu_gs,
168 kw_amdgpu_ps,
169 kw_amdgpu_cs,
170 kw_amdgpu_kernel,
171 kw_tailcc,
173 // Attributes:
174 kw_attributes,
175 kw_allocsize,
176 kw_alwaysinline,
177 kw_argmemonly,
178 kw_sanitize_address,
179 kw_sanitize_hwaddress,
180 kw_sanitize_memtag,
181 kw_builtin,
182 kw_byval,
183 kw_inalloca,
184 kw_cold,
185 kw_convergent,
186 kw_dereferenceable,
187 kw_dereferenceable_or_null,
188 kw_inaccessiblememonly,
189 kw_inaccessiblemem_or_argmemonly,
190 kw_inlinehint,
191 kw_inreg,
192 kw_jumptable,
193 kw_minsize,
194 kw_naked,
195 kw_nest,
196 kw_noalias,
197 kw_nobuiltin,
198 kw_nocapture,
199 kw_noduplicate,
200 kw_nofree,
201 kw_noimplicitfloat,
202 kw_noinline,
203 kw_norecurse,
204 kw_nonlazybind,
205 kw_nonnull,
206 kw_noredzone,
207 kw_noreturn,
208 kw_nosync,
209 kw_nocf_check,
210 kw_nounwind,
211 kw_optforfuzzing,
212 kw_optnone,
213 kw_optsize,
214 kw_readnone,
215 kw_readonly,
216 kw_returned,
217 kw_returns_twice,
218 kw_signext,
219 kw_speculatable,
220 kw_ssp,
221 kw_sspreq,
222 kw_sspstrong,
223 kw_safestack,
224 kw_shadowcallstack,
225 kw_sret,
226 kw_sanitize_thread,
227 kw_sanitize_memory,
228 kw_speculative_load_hardening,
229 kw_strictfp,
230 kw_swifterror,
231 kw_swiftself,
232 kw_uwtable,
233 kw_willreturn,
234 kw_writeonly,
235 kw_zeroext,
236 kw_immarg,
238 kw_type,
239 kw_opaque,
241 kw_comdat,
243 // Comdat types
244 kw_any,
245 kw_exactmatch,
246 kw_largest,
247 kw_noduplicates,
248 kw_samesize,
250 kw_eq,
251 kw_ne,
252 kw_slt,
253 kw_sgt,
254 kw_sle,
255 kw_sge,
256 kw_ult,
257 kw_ugt,
258 kw_ule,
259 kw_uge,
260 kw_oeq,
261 kw_one,
262 kw_olt,
263 kw_ogt,
264 kw_ole,
265 kw_oge,
266 kw_ord,
267 kw_uno,
268 kw_ueq,
269 kw_une,
271 // atomicrmw operations that aren't also instruction keywords.
272 kw_xchg,
273 kw_nand,
274 kw_max,
275 kw_min,
276 kw_umax,
277 kw_umin,
279 // Instruction Opcodes (Opcode in UIntVal).
280 kw_fneg,
281 kw_add,
282 kw_fadd,
283 kw_sub,
284 kw_fsub,
285 kw_mul,
286 kw_fmul,
287 kw_udiv,
288 kw_sdiv,
289 kw_fdiv,
290 kw_urem,
291 kw_srem,
292 kw_frem,
293 kw_shl,
294 kw_lshr,
295 kw_ashr,
296 kw_and,
297 kw_or,
298 kw_xor,
299 kw_icmp,
300 kw_fcmp,
302 kw_phi,
303 kw_call,
304 kw_trunc,
305 kw_zext,
306 kw_sext,
307 kw_fptrunc,
308 kw_fpext,
309 kw_uitofp,
310 kw_sitofp,
311 kw_fptoui,
312 kw_fptosi,
313 kw_inttoptr,
314 kw_ptrtoint,
315 kw_bitcast,
316 kw_addrspacecast,
317 kw_select,
318 kw_va_arg,
320 kw_landingpad,
321 kw_personality,
322 kw_cleanup,
323 kw_catch,
324 kw_filter,
326 kw_ret,
327 kw_br,
328 kw_switch,
329 kw_indirectbr,
330 kw_invoke,
331 kw_resume,
332 kw_unreachable,
333 kw_cleanupret,
334 kw_catchswitch,
335 kw_catchret,
336 kw_catchpad,
337 kw_cleanuppad,
338 kw_callbr,
340 kw_alloca,
341 kw_load,
342 kw_store,
343 kw_fence,
344 kw_cmpxchg,
345 kw_atomicrmw,
346 kw_getelementptr,
348 kw_extractelement,
349 kw_insertelement,
350 kw_shufflevector,
351 kw_extractvalue,
352 kw_insertvalue,
353 kw_blockaddress,
355 // Metadata types.
356 kw_distinct,
358 // Use-list order directives.
359 kw_uselistorder,
360 kw_uselistorder_bb,
362 // Summary index keywords
363 kw_path,
364 kw_hash,
365 kw_gv,
366 kw_guid,
367 kw_name,
368 kw_summaries,
369 kw_flags,
370 kw_linkage,
371 kw_notEligibleToImport,
372 kw_live,
373 kw_dsoLocal,
374 kw_canAutoHide,
375 kw_function,
376 kw_insts,
377 kw_funcFlags,
378 kw_readNone,
379 kw_readOnly,
380 kw_noRecurse,
381 kw_returnDoesNotAlias,
382 kw_noInline,
383 kw_calls,
384 kw_callee,
385 kw_hotness,
386 kw_unknown,
387 kw_hot,
388 kw_critical,
389 kw_relbf,
390 kw_variable,
391 kw_vTableFuncs,
392 kw_virtFunc,
393 kw_aliasee,
394 kw_refs,
395 kw_typeIdInfo,
396 kw_typeTests,
397 kw_typeTestAssumeVCalls,
398 kw_typeCheckedLoadVCalls,
399 kw_typeTestAssumeConstVCalls,
400 kw_typeCheckedLoadConstVCalls,
401 kw_vFuncId,
402 kw_offset,
403 kw_args,
404 kw_typeid,
405 kw_typeidCompatibleVTable,
406 kw_summary,
407 kw_typeTestRes,
408 kw_kind,
409 kw_unsat,
410 kw_byteArray,
411 kw_inline,
412 kw_single,
413 kw_allOnes,
414 kw_sizeM1BitWidth,
415 kw_alignLog2,
416 kw_sizeM1,
417 kw_bitMask,
418 kw_inlineBits,
419 kw_wpdResolutions,
420 kw_wpdRes,
421 kw_indir,
422 kw_singleImpl,
423 kw_branchFunnel,
424 kw_singleImplName,
425 kw_resByArg,
426 kw_byArg,
427 kw_uniformRetVal,
428 kw_uniqueRetVal,
429 kw_virtualConstProp,
430 kw_info,
431 kw_byte,
432 kw_bit,
433 kw_varFlags,
435 // Unsigned Valued tokens (UIntVal).
436 LabelID, // 42:
437 GlobalID, // @42
438 LocalVarID, // %42
439 AttrGrpID, // #42
440 SummaryID, // ^42
442 // String valued tokens (StrVal).
443 LabelStr, // foo:
444 GlobalVar, // @foo @"foo"
445 ComdatVar, // $foo
446 LocalVar, // %foo %"foo"
447 MetadataVar, // !foo
448 StringConstant, // "foo"
449 DwarfTag, // DW_TAG_foo
450 DwarfAttEncoding, // DW_ATE_foo
451 DwarfVirtuality, // DW_VIRTUALITY_foo
452 DwarfLang, // DW_LANG_foo
453 DwarfCC, // DW_CC_foo
454 EmissionKind, // lineTablesOnly
455 NameTableKind, // GNU
456 DwarfOp, // DW_OP_foo
457 DIFlag, // DIFlagFoo
458 DISPFlag, // DISPFlagFoo
459 DwarfMacinfo, // DW_MACINFO_foo
460 ChecksumKind, // CSK_foo
462 // Type valued tokens (TyVal).
463 Type,
465 APFloat, // APFloatVal
466 APSInt // APSInt
468 } // end namespace lltok
469 } // end namespace llvm
471 #endif