LLVM  14.0.0git
WasmYAML.h
Go to the documentation of this file.
1 //===- WasmYAML.h - Wasm YAMLIO implementation ------------------*- 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 /// \file
10 /// This file declares classes for handling the YAML representation
11 /// of wasm binaries.
12 ///
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_OBJECTYAML_WASMYAML_H
16 #define LLVM_OBJECTYAML_WASMYAML_H
17 
18 #include "llvm/ADT/StringRef.h"
19 #include "llvm/BinaryFormat/Wasm.h"
20 #include "llvm/ObjectYAML/YAML.h"
21 #include "llvm/Support/Casting.h"
22 #include <cstdint>
23 #include <memory>
24 #include <vector>
25 
26 namespace llvm {
27 namespace WasmYAML {
28 
32 LLVM_YAML_STRONG_TYPEDEF(uint32_t, SignatureForm)
41 LLVM_YAML_STRONG_TYPEDEF(uint32_t, FeaturePolicyPrefix)
42 
43 struct FileHeader {
44  yaml::Hex32 Version;
45 };
46 
47 struct Limits {
48  LimitFlags Flags;
49  yaml::Hex32 Minimum;
50  yaml::Hex32 Maximum;
51 };
52 
53 struct Table {
54  TableType ElemType;
57 };
58 
59 struct Export {
61  ExportKind Kind;
63 };
64 
65 struct ElemSegment {
70  std::vector<uint32_t> Functions;
71 };
72 
73 struct Global {
76  bool Mutable;
78 };
79 
80 struct Import {
83  ExportKind Kind;
84  union {
90  };
91 };
92 
93 struct LocalDecl {
96 };
97 
98 struct Function {
100  std::vector<LocalDecl> Locals;
102 };
103 
104 struct Relocation {
105  RelocType Type;
107  // TODO(wvo): this would strictly be better as Hex64, but that will change
108  // all existing obj2yaml output.
109  yaml::Hex32 Offset;
110  int64_t Addend;
111 };
112 
113 struct DataSegment {
119 };
120 
121 struct NameEntry {
124 };
125 
127  std::string Name;
128  std::string Version;
129 };
130 
131 struct FeatureEntry {
132  FeaturePolicyPrefix Prefix;
133  std::string Name;
134 };
135 
136 struct SegmentInfo {
140  SegmentFlags Flags;
141 };
142 
143 struct Signature {
145  SignatureForm Form = wasm::WASM_TYPE_FUNC;
146  std::vector<ValueType> ParamTypes;
147  std::vector<ValueType> ReturnTypes;
148 };
149 
150 struct SymbolInfo {
155  union {
158  };
159 };
160 
161 struct InitFunction {
164 };
165 
166 struct ComdatEntry {
167  ComdatKind Kind;
169 };
170 
171 struct Comdat {
173  std::vector<ComdatEntry> Entries;
174 };
175 
176 struct Section {
178  virtual ~Section();
179 
181  std::vector<Relocation> Relocations;
182 };
183 
186  : Section(wasm::WASM_SEC_CUSTOM), Name(Name) {}
187 
188  static bool classof(const Section *S) {
189  return S->Type == wasm::WASM_SEC_CUSTOM;
190  }
191 
194 };
195 
200 };
201 
205 };
206 
208  DylinkSection() : CustomSection("dylink.0") {}
209 
210  static bool classof(const Section *S) {
211  auto C = dyn_cast<CustomSection>(S);
212  return C && C->Name == "dylink.0";
213  }
214 
219  std::vector<StringRef> Needed;
220  std::vector<DylinkImportInfo> ImportInfo;
221  std::vector<DylinkExportInfo> ExportInfo;
222 };
223 
225  NameSection() : CustomSection("name") {}
226 
227  static bool classof(const Section *S) {
228  auto C = dyn_cast<CustomSection>(S);
229  return C && C->Name == "name";
230  }
231 
232  std::vector<NameEntry> FunctionNames;
233  std::vector<NameEntry> GlobalNames;
234  std::vector<NameEntry> DataSegmentNames;
235 };
236 
238  LinkingSection() : CustomSection("linking") {}
239 
240  static bool classof(const Section *S) {
241  auto C = dyn_cast<CustomSection>(S);
242  return C && C->Name == "linking";
243  }
244 
246  std::vector<SymbolInfo> SymbolTable;
247  std::vector<SegmentInfo> SegmentInfos;
248  std::vector<InitFunction> InitFunctions;
249  std::vector<Comdat> Comdats;
250 };
251 
253  ProducersSection() : CustomSection("producers") {}
254 
255  static bool classof(const Section *S) {
256  auto C = dyn_cast<CustomSection>(S);
257  return C && C->Name == "producers";
258  }
259 
260  std::vector<ProducerEntry> Languages;
261  std::vector<ProducerEntry> Tools;
262  std::vector<ProducerEntry> SDKs;
263 };
264 
266  TargetFeaturesSection() : CustomSection("target_features") {}
267 
268  static bool classof(const Section *S) {
269  auto C = dyn_cast<CustomSection>(S);
270  return C && C->Name == "target_features";
271  }
272 
273  std::vector<FeatureEntry> Features;
274 };
275 
278 
279  static bool classof(const Section *S) {
280  return S->Type == wasm::WASM_SEC_TYPE;
281  }
282 
283  std::vector<Signature> Signatures;
284 };
285 
288 
289  static bool classof(const Section *S) {
290  return S->Type == wasm::WASM_SEC_IMPORT;
291  }
292 
293  std::vector<Import> Imports;
294 };
295 
298 
299  static bool classof(const Section *S) {
300  return S->Type == wasm::WASM_SEC_FUNCTION;
301  }
302 
303  std::vector<uint32_t> FunctionTypes;
304 };
305 
308 
309  static bool classof(const Section *S) {
310  return S->Type == wasm::WASM_SEC_TABLE;
311  }
312 
313  std::vector<Table> Tables;
314 };
315 
318 
319  static bool classof(const Section *S) {
320  return S->Type == wasm::WASM_SEC_MEMORY;
321  }
322 
323  std::vector<Limits> Memories;
324 };
325 
326 struct TagSection : Section {
328 
329  static bool classof(const Section *S) {
330  return S->Type == wasm::WASM_SEC_TAG;
331  }
332 
333  std::vector<uint32_t> TagTypes;
334 };
335 
338 
339  static bool classof(const Section *S) {
340  return S->Type == wasm::WASM_SEC_GLOBAL;
341  }
342 
343  std::vector<Global> Globals;
344 };
345 
348 
349  static bool classof(const Section *S) {
350  return S->Type == wasm::WASM_SEC_EXPORT;
351  }
352 
353  std::vector<Export> Exports;
354 };
355 
358 
359  static bool classof(const Section *S) {
360  return S->Type == wasm::WASM_SEC_START;
361  }
362 
364 };
365 
368 
369  static bool classof(const Section *S) {
370  return S->Type == wasm::WASM_SEC_ELEM;
371  }
372 
373  std::vector<ElemSegment> Segments;
374 };
375 
378 
379  static bool classof(const Section *S) {
380  return S->Type == wasm::WASM_SEC_CODE;
381  }
382 
383  std::vector<Function> Functions;
384 };
385 
388 
389  static bool classof(const Section *S) {
390  return S->Type == wasm::WASM_SEC_DATA;
391  }
392 
393  std::vector<DataSegment> Segments;
394 };
395 
398 
399  static bool classof(const Section *S) {
400  return S->Type == wasm::WASM_SEC_DATACOUNT;
401  }
402 
404 };
405 
406 struct Object {
408  std::vector<std::unique_ptr<Section>> Sections;
409 };
410 
411 } // end namespace WasmYAML
412 } // end namespace llvm
413 
414 LLVM_YAML_IS_SEQUENCE_VECTOR(std::unique_ptr<llvm::WasmYAML::Section>)
437 
438 namespace llvm {
439 namespace yaml {
440 
441 template <> struct MappingTraits<WasmYAML::FileHeader> {
442  static void mapping(IO &IO, WasmYAML::FileHeader &FileHdr);
443 };
444 
445 template <> struct MappingTraits<std::unique_ptr<WasmYAML::Section>> {
446  static void mapping(IO &IO, std::unique_ptr<WasmYAML::Section> &Section);
447 };
448 
449 template <> struct MappingTraits<WasmYAML::Object> {
450  static void mapping(IO &IO, WasmYAML::Object &Object);
451 };
452 
453 template <> struct MappingTraits<WasmYAML::Import> {
454  static void mapping(IO &IO, WasmYAML::Import &Import);
455 };
456 
457 template <> struct MappingTraits<WasmYAML::Export> {
458  static void mapping(IO &IO, WasmYAML::Export &Export);
459 };
460 
461 template <> struct MappingTraits<WasmYAML::Global> {
462  static void mapping(IO &IO, WasmYAML::Global &Global);
463 };
464 
465 template <> struct ScalarBitSetTraits<WasmYAML::LimitFlags> {
466  static void bitset(IO &IO, WasmYAML::LimitFlags &Value);
467 };
468 
469 template <> struct ScalarBitSetTraits<WasmYAML::SymbolFlags> {
470  static void bitset(IO &IO, WasmYAML::SymbolFlags &Value);
471 };
472 
473 template <> struct ScalarEnumerationTraits<WasmYAML::SymbolKind> {
474  static void enumeration(IO &IO, WasmYAML::SymbolKind &Kind);
475 };
476 
477 template <> struct ScalarBitSetTraits<WasmYAML::SegmentFlags> {
478  static void bitset(IO &IO, WasmYAML::SegmentFlags &Value);
479 };
480 
481 template <> struct ScalarEnumerationTraits<WasmYAML::SectionType> {
482  static void enumeration(IO &IO, WasmYAML::SectionType &Type);
483 };
484 
485 template <> struct MappingTraits<WasmYAML::Signature> {
486  static void mapping(IO &IO, WasmYAML::Signature &Signature);
487 };
488 
489 template <> struct MappingTraits<WasmYAML::Table> {
490  static void mapping(IO &IO, WasmYAML::Table &Table);
491 };
492 
493 template <> struct MappingTraits<WasmYAML::Limits> {
494  static void mapping(IO &IO, WasmYAML::Limits &Limits);
495 };
496 
497 template <> struct MappingTraits<WasmYAML::Function> {
498  static void mapping(IO &IO, WasmYAML::Function &Function);
499 };
500 
501 template <> struct MappingTraits<WasmYAML::Relocation> {
502  static void mapping(IO &IO, WasmYAML::Relocation &Relocation);
503 };
504 
505 template <> struct MappingTraits<WasmYAML::NameEntry> {
506  static void mapping(IO &IO, WasmYAML::NameEntry &NameEntry);
507 };
508 
509 template <> struct MappingTraits<WasmYAML::ProducerEntry> {
510  static void mapping(IO &IO, WasmYAML::ProducerEntry &ProducerEntry);
511 };
512 
513 template <> struct ScalarEnumerationTraits<WasmYAML::FeaturePolicyPrefix> {
514  static void enumeration(IO &IO, WasmYAML::FeaturePolicyPrefix &Prefix);
515 };
516 
517 template <> struct MappingTraits<WasmYAML::FeatureEntry> {
518  static void mapping(IO &IO, WasmYAML::FeatureEntry &FeatureEntry);
519 };
520 
521 template <> struct MappingTraits<WasmYAML::SegmentInfo> {
522  static void mapping(IO &IO, WasmYAML::SegmentInfo &SegmentInfo);
523 };
524 
525 template <> struct MappingTraits<WasmYAML::LocalDecl> {
526  static void mapping(IO &IO, WasmYAML::LocalDecl &LocalDecl);
527 };
528 
529 template <> struct MappingTraits<wasm::WasmInitExpr> {
530  static void mapping(IO &IO, wasm::WasmInitExpr &Expr);
531 };
532 
533 template <> struct MappingTraits<WasmYAML::DataSegment> {
534  static void mapping(IO &IO, WasmYAML::DataSegment &Segment);
535 };
536 
537 template <> struct MappingTraits<WasmYAML::ElemSegment> {
538  static void mapping(IO &IO, WasmYAML::ElemSegment &Segment);
539 };
540 
541 template <> struct MappingTraits<WasmYAML::SymbolInfo> {
542  static void mapping(IO &IO, WasmYAML::SymbolInfo &Info);
543 };
544 
545 template <> struct MappingTraits<WasmYAML::InitFunction> {
546  static void mapping(IO &IO, WasmYAML::InitFunction &Init);
547 };
548 
549 template <> struct ScalarEnumerationTraits<WasmYAML::ComdatKind> {
550  static void enumeration(IO &IO, WasmYAML::ComdatKind &Kind);
551 };
552 
553 template <> struct MappingTraits<WasmYAML::ComdatEntry> {
554  static void mapping(IO &IO, WasmYAML::ComdatEntry &ComdatEntry);
555 };
556 
557 template <> struct MappingTraits<WasmYAML::Comdat> {
558  static void mapping(IO &IO, WasmYAML::Comdat &Comdat);
559 };
560 
561 template <> struct ScalarEnumerationTraits<WasmYAML::ValueType> {
562  static void enumeration(IO &IO, WasmYAML::ValueType &Type);
563 };
564 
565 template <> struct ScalarEnumerationTraits<WasmYAML::ExportKind> {
566  static void enumeration(IO &IO, WasmYAML::ExportKind &Kind);
567 };
568 
569 template <> struct ScalarEnumerationTraits<WasmYAML::TableType> {
570  static void enumeration(IO &IO, WasmYAML::TableType &Type);
571 };
572 
573 template <> struct ScalarEnumerationTraits<WasmYAML::Opcode> {
574  static void enumeration(IO &IO, WasmYAML::Opcode &Opcode);
575 };
576 
577 template <> struct ScalarEnumerationTraits<WasmYAML::RelocType> {
578  static void enumeration(IO &IO, WasmYAML::RelocType &Kind);
579 };
580 
581 template <> struct MappingTraits<WasmYAML::DylinkImportInfo> {
582  static void mapping(IO &IO, WasmYAML::DylinkImportInfo &Info);
583 };
584 
585 template <> struct MappingTraits<WasmYAML::DylinkExportInfo> {
586  static void mapping(IO &IO, WasmYAML::DylinkExportInfo &Info);
587 };
588 
589 } // end namespace yaml
590 } // end namespace llvm
591 
592 #endif // LLVM_OBJECTYAML_WASMYAML_H
llvm::WasmYAML::LinkingSection::SymbolTable
std::vector< SymbolInfo > SymbolTable
Definition: WasmYAML.h:246
llvm::WasmYAML::TableSection::Tables
std::vector< Table > Tables
Definition: WasmYAML.h:313
llvm::WasmYAML::GlobalSection
Definition: WasmYAML.h:336
llvm::WasmYAML::FileHeader
Definition: WasmYAML.h:43
llvm::WasmYAML::Function::Locals
std::vector< LocalDecl > Locals
Definition: WasmYAML.h:100
llvm::WasmYAML::ProducerEntry::Name
std::string Name
Definition: WasmYAML.h:127
llvm::WasmYAML::FeatureEntry::Name
std::string Name
Definition: WasmYAML.h:133
llvm::WasmYAML::Section::Relocations
std::vector< Relocation > Relocations
Definition: WasmYAML.h:181
llvm::WasmYAML::InitFunction
Definition: WasmYAML.h:161
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AllocatorList.h:22
llvm::WasmYAML::Object::Sections
std::vector< std::unique_ptr< Section > > Sections
Definition: WasmYAML.h:408
llvm::WasmYAML::DylinkExportInfo::Name
StringRef Name
Definition: WasmYAML.h:203
llvm::WasmYAML::Section::~Section
virtual ~Section()
llvm::WasmYAML::ProducersSection
Definition: WasmYAML.h:252
llvm::WasmYAML::ProducersSection::Tools
std::vector< ProducerEntry > Tools
Definition: WasmYAML.h:261
llvm::WasmYAML::StartSection::StartFunction
uint32_t StartFunction
Definition: WasmYAML.h:363
llvm::WasmYAML::InitFunction::Priority
uint32_t Priority
Definition: WasmYAML.h:162
llvm::WasmYAML::SymbolInfo::Index
uint32_t Index
Definition: WasmYAML.h:151
llvm::WasmYAML::NameEntry::Index
uint32_t Index
Definition: WasmYAML.h:122
llvm::wasm::WASM_SEC_GLOBAL
@ WASM_SEC_GLOBAL
Definition: Wasm.h:241
llvm::WasmYAML::FileHeader::Version
yaml::Hex32 Version
Definition: WasmYAML.h:44
llvm::WasmYAML::LocalDecl
Definition: WasmYAML.h:93
llvm::cl::Prefix
@ Prefix
Definition: CommandLine.h:164
llvm::WasmYAML::NameSection::NameSection
NameSection()
Definition: WasmYAML.h:225
llvm::Function
Definition: Function.h:62
StringRef.h
llvm::WasmYAML::Import::SigIndex
uint32_t SigIndex
Definition: WasmYAML.h:85
llvm::WasmYAML::Comdat
Definition: WasmYAML.h:171
llvm::codeview::SymbolKind
SymbolKind
Duplicate copy of the above enum, but using the official CV names.
Definition: CodeView.h:47
llvm::WasmYAML::InitFunction::Symbol
uint32_t Symbol
Definition: WasmYAML.h:163
llvm::WasmYAML::FunctionSection::FunctionTypes
std::vector< uint32_t > FunctionTypes
Definition: WasmYAML.h:303
llvm::WasmYAML::DylinkExportInfo
Definition: WasmYAML.h:202
llvm::WasmYAML::TableSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:309
llvm::WasmYAML::LinkingSection::LinkingSection
LinkingSection()
Definition: WasmYAML.h:238
LLVM_YAML_IS_SEQUENCE_VECTOR
#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)
llvm::WasmYAML::DataSection
Definition: WasmYAML.h:386
llvm::WasmYAML::DataSegment::Offset
wasm::WasmInitExpr Offset
Definition: WasmYAML.h:117
llvm::WasmYAML::DataSection::DataSection
DataSection()
Definition: WasmYAML.h:387
llvm::WasmYAML::ElemSection::ElemSection
ElemSection()
Definition: WasmYAML.h:367
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
llvm::WasmYAML::TableSection
Definition: WasmYAML.h:306
llvm::WasmYAML::ElemSection
Definition: WasmYAML.h:366
llvm::WasmYAML::SegmentInfo::Name
StringRef Name
Definition: WasmYAML.h:138
llvm::WasmYAML::ElemSegment
Definition: WasmYAML.h:65
llvm::WasmYAML::Relocation::Offset
yaml::Hex32 Offset
Definition: WasmYAML.h:109
llvm::wasm::WASM_SEC_MEMORY
@ WASM_SEC_MEMORY
Definition: Wasm.h:240
llvm::wasm::WASM_SEC_START
@ WASM_SEC_START
Definition: Wasm.h:243
llvm::WasmYAML::MemorySection
Definition: WasmYAML.h:316
llvm::wasm::WASM_SEC_FUNCTION
@ WASM_SEC_FUNCTION
Definition: Wasm.h:238
llvm::WasmYAML::NameSection::GlobalNames
std::vector< NameEntry > GlobalNames
Definition: WasmYAML.h:233
llvm::WasmYAML::DataSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:389
llvm::yaml::MappingTraits
Definition: ModuleSummaryIndex.h:52
llvm::WasmYAML::ImportSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:289
llvm::WasmYAML::GlobalSection::Globals
std::vector< Global > Globals
Definition: WasmYAML.h:343
llvm::WasmYAML::ProducerEntry
Definition: WasmYAML.h:126
llvm::wasm::WASM_SEC_ELEM
@ WASM_SEC_ELEM
Definition: Wasm.h:244
llvm::WasmYAML::CustomSection::Name
StringRef Name
Definition: WasmYAML.h:192
llvm::wasm::WasmDataReference
Definition: Wasm.h:178
llvm::MachO::SymbolFlags
SymbolFlags
Symbol flags.
Definition: Symbol.h:25
llvm::WasmYAML::LinkingSection::Comdats
std::vector< Comdat > Comdats
Definition: WasmYAML.h:249
llvm::WasmYAML::Import
Definition: WasmYAML.h:80
llvm::WasmYAML::DylinkImportInfo::Field
StringRef Field
Definition: WasmYAML.h:198
llvm::wasm::WASM_SEC_TAG
@ WASM_SEC_TAG
Definition: Wasm.h:248
llvm::WasmYAML::Import::TableImport
Table TableImport
Definition: WasmYAML.h:87
llvm::WasmYAML::CustomSection
Definition: WasmYAML.h:184
llvm::ARMBuildAttrs::Section
@ Section
Legacy Tags.
Definition: ARMBuildAttributes.h:82
llvm::WasmYAML::ProducerEntry::Version
std::string Version
Definition: WasmYAML.h:128
llvm::WasmYAML::ComdatEntry::Index
uint32_t Index
Definition: WasmYAML.h:168
llvm::WasmYAML::SegmentInfo::Index
uint32_t Index
Definition: WasmYAML.h:137
llvm::WasmYAML::Comdat::Name
StringRef Name
Definition: WasmYAML.h:172
llvm::WasmYAML::NameSection
Definition: WasmYAML.h:224
llvm::WasmYAML::DataSegment::Content
yaml::BinaryRef Content
Definition: WasmYAML.h:118
llvm::WasmYAML::GlobalSection::GlobalSection
GlobalSection()
Definition: WasmYAML.h:337
llvm::WasmYAML::Section
Definition: WasmYAML.h:176
llvm::WasmYAML::Relocation::Type
RelocType Type
Definition: WasmYAML.h:105
llvm::WasmYAML::Global::Index
uint32_t Index
Definition: WasmYAML.h:74
llvm::WasmYAML::Export::Kind
ExportKind Kind
Definition: WasmYAML.h:61
llvm::WasmYAML::FunctionSection
Definition: WasmYAML.h:296
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
llvm::wasm::WASM_SEC_IMPORT
@ WASM_SEC_IMPORT
Definition: Wasm.h:237
llvm::WasmYAML::LinkingSection::Version
uint32_t Version
Definition: WasmYAML.h:245
llvm::WasmYAML::ProducersSection::ProducersSection
ProducersSection()
Definition: WasmYAML.h:253
llvm::WasmYAML::DylinkExportInfo::Flags
SymbolFlags Flags
Definition: WasmYAML.h:204
llvm::WasmYAML::CodeSection::CodeSection
CodeSection()
Definition: WasmYAML.h:377
llvm::WasmYAML::Limits::Maximum
yaml::Hex32 Maximum
Definition: WasmYAML.h:50
llvm::WasmYAML::ComdatEntry
Definition: WasmYAML.h:166
llvm::WasmYAML::Signature::ReturnTypes
std::vector< ValueType > ReturnTypes
Definition: WasmYAML.h:147
llvm::WasmYAML::CodeSection
Definition: WasmYAML.h:376
YAML.h
llvm::WasmYAML::SymbolInfo::Flags
SymbolFlags Flags
Definition: WasmYAML.h:154
llvm::WasmYAML::NameEntry
Definition: WasmYAML.h:121
llvm::WasmYAML::Table::TableLimits
Limits TableLimits
Definition: WasmYAML.h:55
llvm::WasmYAML::SegmentInfo::Flags
SegmentFlags Flags
Definition: WasmYAML.h:140
llvm::WasmYAML::LinkingSection::SegmentInfos
std::vector< SegmentInfo > SegmentInfos
Definition: WasmYAML.h:247
llvm::WasmYAML::Export::Name
StringRef Name
Definition: WasmYAML.h:60
llvm::WasmYAML::SymbolInfo
Definition: WasmYAML.h:150
llvm::WasmYAML::Function
Definition: WasmYAML.h:98
llvm::WasmYAML::ImportSection::ImportSection
ImportSection()
Definition: WasmYAML.h:287
llvm::WasmYAML::TargetFeaturesSection::Features
std::vector< FeatureEntry > Features
Definition: WasmYAML.h:273
Info
Analysis containing CSE Info
Definition: CSEInfo.cpp:27
llvm::WasmYAML::Limits
Definition: WasmYAML.h:47
llvm::WasmYAML::Import::Module
StringRef Module
Definition: WasmYAML.h:81
llvm::WasmYAML::Import::GlobalImport
Global GlobalImport
Definition: WasmYAML.h:86
llvm::WasmYAML::DylinkImportInfo
Definition: WasmYAML.h:196
llvm::Comdat
Definition: Comdat.h:33
llvm::lltok::Kind
Kind
Definition: LLToken.h:18
llvm::PassSummaryAction::Import
@ Import
Import information from summary.
llvm::WasmYAML::ExportSection
Definition: WasmYAML.h:346
llvm::WasmYAML::Signature::Index
uint32_t Index
Definition: WasmYAML.h:144
llvm::WasmYAML::ElemSegment::Functions
std::vector< uint32_t > Functions
Definition: WasmYAML.h:70
llvm::WasmYAML::Object::Header
FileHeader Header
Definition: WasmYAML.h:407
llvm::WasmYAML::Function::Index
uint32_t Index
Definition: WasmYAML.h:99
llvm::WasmYAML::Section::Type
SectionType Type
Definition: WasmYAML.h:180
llvm::wasm::WASM_SEC_CODE
@ WASM_SEC_CODE
Definition: Wasm.h:245
llvm::WasmYAML::ElemSegment::Flags
uint32_t Flags
Definition: WasmYAML.h:66
llvm::WasmYAML::SegmentInfo
Definition: WasmYAML.h:136
llvm::WasmYAML::CustomSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:188
llvm::OutputFileType::Object
@ Object
llvm::WasmYAML::ExportSection::Exports
std::vector< Export > Exports
Definition: WasmYAML.h:353
llvm::WasmYAML::SymbolInfo::Kind
SymbolKind Kind
Definition: WasmYAML.h:153
llvm::WasmYAML::Relocation::Index
uint32_t Index
Definition: WasmYAML.h:106
llvm::WasmYAML::MemorySection::MemorySection
MemorySection()
Definition: WasmYAML.h:317
llvm::WasmYAML::CustomSection::CustomSection
CustomSection(StringRef Name)
Definition: WasmYAML.h:185
llvm::WasmYAML::TargetFeaturesSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:268
llvm::WasmYAML::Global::Type
ValueType Type
Definition: WasmYAML.h:75
llvm::WasmYAML::CustomSection::Payload
yaml::BinaryRef Payload
Definition: WasmYAML.h:193
llvm::WasmYAML::FunctionSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:299
llvm::WasmYAML::TagSection::TagSection
TagSection()
Definition: WasmYAML.h:327
llvm::WasmYAML::Signature::Form
SignatureForm Form
Definition: WasmYAML.h:145
llvm::WasmYAML::Table::Index
uint32_t Index
Definition: WasmYAML.h:56
llvm::WasmYAML::ElemSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:369
llvm::WasmYAML::Table
Definition: WasmYAML.h:53
LLVM_YAML_STRONG_TYPEDEF
#define LLVM_YAML_STRONG_TYPEDEF(_base, _type)
llvm::WasmYAML::StartSection
Definition: WasmYAML.h:356
llvm::WasmYAML::TypeSection::Signatures
std::vector< Signature > Signatures
Definition: WasmYAML.h:283
llvm::WasmYAML::TargetFeaturesSection
Definition: WasmYAML.h:265
llvm::WasmYAML::ElemSegment::Offset
wasm::WasmInitExpr Offset
Definition: WasmYAML.h:69
llvm::WasmYAML::GlobalSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:339
llvm::WasmYAML::SymbolInfo::Name
StringRef Name
Definition: WasmYAML.h:152
llvm::WasmYAML::TagSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:329
llvm::AMDGPU::HSAMD::ValueType
ValueType
Value types.
Definition: AMDGPUMetadata.h:95
llvm::WasmYAML::FeatureEntry
Definition: WasmYAML.h:131
llvm::WasmYAML::Table::ElemType
TableType ElemType
Definition: WasmYAML.h:54
llvm::WasmYAML::StartSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:359
llvm::WasmYAML::FeatureEntry::Prefix
FeaturePolicyPrefix Prefix
Definition: WasmYAML.h:132
llvm::WasmYAML::TypeSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:279
llvm::wasm::WASM_SEC_CUSTOM
@ WASM_SEC_CUSTOM
Definition: Wasm.h:235
llvm::wasm::WASM_SEC_EXPORT
@ WASM_SEC_EXPORT
Definition: Wasm.h:242
llvm::WasmYAML::ElemSegment::TableNumber
uint32_t TableNumber
Definition: WasmYAML.h:67
llvm::WasmYAML::DataCountSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:399
llvm::WasmYAML::CodeSection::Functions
std::vector< Function > Functions
Definition: WasmYAML.h:383
llvm::WasmYAML::Signature
Definition: WasmYAML.h:143
llvm::wasm::WASM_SEC_TABLE
@ WASM_SEC_TABLE
Definition: Wasm.h:239
llvm::WasmYAML::Global::Mutable
bool Mutable
Definition: WasmYAML.h:76
llvm::WasmYAML::Import::Field
StringRef Field
Definition: WasmYAML.h:82
llvm::WasmYAML::ComdatEntry::Kind
ComdatKind Kind
Definition: WasmYAML.h:167
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::yaml::BinaryRef
Specialized YAMLIO scalar type for representing a binary blob.
Definition: YAML.h:63
llvm::WasmYAML::Relocation::Addend
int64_t Addend
Definition: WasmYAML.h:110
uint32_t
llvm::WasmYAML::Global::InitExpr
wasm::WasmInitExpr InitExpr
Definition: WasmYAML.h:77
llvm::WasmYAML::StartSection::StartSection
StartSection()
Definition: WasmYAML.h:357
llvm::WasmYAML::ProducersSection::SDKs
std::vector< ProducerEntry > SDKs
Definition: WasmYAML.h:262
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::WasmYAML::CodeSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:379
llvm::WasmYAML::LocalDecl::Count
uint32_t Count
Definition: WasmYAML.h:95
llvm::WasmYAML::DylinkImportInfo::Module
StringRef Module
Definition: WasmYAML.h:197
llvm::WasmYAML::Relocation
Definition: WasmYAML.h:104
llvm::WasmYAML::TagSection::TagTypes
std::vector< uint32_t > TagTypes
Definition: WasmYAML.h:333
llvm::WasmYAML::LinkingSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:240
llvm::WasmYAML::Import::TagIndex
uint32_t TagIndex
Definition: WasmYAML.h:89
llvm::Init
Definition: Record.h:274
llvm::WasmYAML::Object
Definition: WasmYAML.h:406
llvm::PointerUnion< const Value *, const PseudoSourceValue * >
llvm::WasmYAML::Comdat::Entries
std::vector< ComdatEntry > Entries
Definition: WasmYAML.h:173
llvm::WasmYAML::ExportSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:349
llvm::WasmYAML::DataCountSection
Definition: WasmYAML.h:396
llvm::WasmYAML::DataSegment::InitFlags
uint32_t InitFlags
Definition: WasmYAML.h:115
llvm::WasmYAML::ExportSection::ExportSection
ExportSection()
Definition: WasmYAML.h:347
llvm::WasmYAML::TagSection
Definition: WasmYAML.h:326
llvm::WasmYAML::TypeSection::TypeSection
TypeSection()
Definition: WasmYAML.h:277
std
Definition: BitVector.h:850
llvm::WasmYAML::Import::Memory
Limits Memory
Definition: WasmYAML.h:88
llvm::WasmYAML::DataSegment
Definition: WasmYAML.h:113
llvm::WasmYAML::ProducersSection::Languages
std::vector< ProducerEntry > Languages
Definition: WasmYAML.h:260
llvm::WasmYAML::Section::Section
Section(SectionType SecType)
Definition: WasmYAML.h:177
llvm::WasmYAML::DataSegment::MemoryIndex
uint32_t MemoryIndex
Definition: WasmYAML.h:116
llvm::wasm::WASM_TYPE_FUNC
@ WASM_TYPE_FUNC
Definition: Wasm.h:260
llvm::WasmYAML::Limits::Flags
LimitFlags Flags
Definition: WasmYAML.h:48
llvm::WasmYAML::SegmentInfo::Alignment
uint32_t Alignment
Definition: WasmYAML.h:139
llvm::WasmYAML::DataCountSection::Count
uint32_t Count
Definition: WasmYAML.h:403
llvm::wasm::WASM_SEC_DATA
@ WASM_SEC_DATA
Definition: Wasm.h:246
llvm::WasmYAML::DataSection::Segments
std::vector< DataSegment > Segments
Definition: WasmYAML.h:393
Casting.h
llvm::WasmYAML::LinkingSection
Definition: WasmYAML.h:237
llvm::sampleprof::SecType
SecType
Definition: SampleProf.h:121
llvm::WasmYAML::Global
Definition: WasmYAML.h:73
llvm::WasmYAML::MemorySection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:319
llvm::WasmYAML::TableSection::TableSection
TableSection()
Definition: WasmYAML.h:307
llvm::wasm::WasmInitExpr
Definition: Wasm.h:94
Wasm.h
llvm::WasmYAML::LinkingSection::InitFunctions
std::vector< InitFunction > InitFunctions
Definition: WasmYAML.h:248
llvm::WasmYAML::NameEntry::Name
StringRef Name
Definition: WasmYAML.h:123
llvm::WasmYAML::Limits::Minimum
yaml::Hex32 Minimum
Definition: WasmYAML.h:49
llvm::WasmYAML::NameSection::FunctionNames
std::vector< NameEntry > FunctionNames
Definition: WasmYAML.h:232
llvm::WasmYAML::SymbolInfo::DataRef
wasm::WasmDataReference DataRef
Definition: WasmYAML.h:157
llvm::WasmYAML::Export
Definition: WasmYAML.h:59
llvm::WasmYAML::TypeSection
Definition: WasmYAML.h:276
llvm::WasmYAML::NameSection::DataSegmentNames
std::vector< NameEntry > DataSegmentNames
Definition: WasmYAML.h:234
llvm::WasmYAML::TargetFeaturesSection::TargetFeaturesSection
TargetFeaturesSection()
Definition: WasmYAML.h:266
llvm::WasmYAML::Signature::ParamTypes
std::vector< ValueType > ParamTypes
Definition: WasmYAML.h:146
llvm::WasmYAML::MemorySection::Memories
std::vector< Limits > Memories
Definition: WasmYAML.h:323
llvm::WasmYAML::Import::Kind
ExportKind Kind
Definition: WasmYAML.h:83
llvm::WasmYAML::ElemSegment::ElemKind
ValueType ElemKind
Definition: WasmYAML.h:68
llvm::WasmYAML::Function::Body
yaml::BinaryRef Body
Definition: WasmYAML.h:101
llvm::WasmYAML::NameSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:227
llvm::WasmYAML::LocalDecl::Type
ValueType Type
Definition: WasmYAML.h:94
llvm::wasm::WASM_SEC_TYPE
@ WASM_SEC_TYPE
Definition: Wasm.h:236
llvm::WasmYAML::DataSegment::SectionOffset
uint32_t SectionOffset
Definition: WasmYAML.h:114
llvm::WasmYAML::Export::Index
uint32_t Index
Definition: WasmYAML.h:62
llvm::wasm::WASM_SEC_DATACOUNT
@ WASM_SEC_DATACOUNT
Definition: Wasm.h:247
llvm::WasmYAML::ImportSection
Definition: WasmYAML.h:286
llvm::WasmYAML::ProducersSection::classof
static bool classof(const Section *S)
Definition: WasmYAML.h:255
llvm::Value
LLVM Value Representation.
Definition: Value.h:74
llvm::WasmYAML::ElemSection::Segments
std::vector< ElemSegment > Segments
Definition: WasmYAML.h:373
llvm::WasmYAML::ImportSection::Imports
std::vector< Import > Imports
Definition: WasmYAML.h:293
llvm::MachO::SectionType
SectionType
These are the section type and attributes fields.
Definition: MachO.h:120
llvm::WasmYAML::DataCountSection::DataCountSection
DataCountSection()
Definition: WasmYAML.h:397
llvm::WasmYAML::SymbolInfo::ElementIndex
uint32_t ElementIndex
Definition: WasmYAML.h:156
llvm::WasmYAML::DylinkImportInfo::Flags
SymbolFlags Flags
Definition: WasmYAML.h:199
llvm::WasmYAML::FunctionSection::FunctionSection
FunctionSection()
Definition: WasmYAML.h:297