LLVM  16.0.0git
OffloadYAML.h
Go to the documentation of this file.
1 //===- OffloadYAML.h - Offload Binary 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 of
11 /// offloading binaries.
12 ///
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_OBJECTYAML_OFFLOADYAML_H
16 #define LLVM_OBJECTYAML_OFFLOADYAML_H
17 
18 #include "llvm/ADT/MapVector.h"
20 #include "llvm/ObjectYAML/YAML.h"
22 
23 namespace llvm {
24 namespace OffloadYAML {
25 
26 struct Binary {
27  struct StringEntry {
30  };
31 
32  struct Member {
38  };
39 
44  std::vector<Member> Members;
45 };
46 
47 } // end namespace OffloadYAML
48 } // end namespace llvm
49 
52 
53 namespace llvm {
54 namespace yaml {
55 
56 template <> struct ScalarEnumerationTraits<object::ImageKind> {
57  static void enumeration(IO &IO, object::ImageKind &Value);
58 };
59 
60 template <> struct ScalarEnumerationTraits<object::OffloadKind> {
61  static void enumeration(IO &IO, object::OffloadKind &Value);
62 };
63 
64 template <> struct MappingTraits<OffloadYAML::Binary> {
65  static void mapping(IO &IO, OffloadYAML::Binary &O);
66 };
67 
68 template <> struct MappingTraits<OffloadYAML::Binary::StringEntry> {
69  static void mapping(IO &IO, OffloadYAML::Binary::StringEntry &M);
70 };
71 
72 template <> struct MappingTraits<OffloadYAML::Binary::Member> {
73  static void mapping(IO &IO, OffloadYAML::Binary::Member &M);
74 };
75 
76 } // end namespace yaml
77 } // end namespace llvm
78 
79 #endif // LLVM_OBJECTYAML_OFFLOADYAML_H
llvm::OffloadYAML::Binary::StringEntry
Definition: OffloadYAML.h:27
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
M
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Definition: README.txt:252
llvm::OffloadYAML::Binary::Size
Optional< uint64_t > Size
Definition: OffloadYAML.h:41
MapVector.h
LLVM_YAML_IS_SEQUENCE_VECTOR
#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)
llvm::Optional< object::ImageKind >
llvm::yaml::MappingTraits
Definition: ModuleSummaryIndex.h:53
llvm::OffloadYAML::Binary::StringEntry::Value
StringRef Value
Definition: OffloadYAML.h:29
YAML.h
llvm::OffloadYAML::Binary::StringEntry::Key
StringRef Key
Definition: OffloadYAML.h:28
llvm::object::OffloadKind
OffloadKind
The producer of the associated offloading image.
Definition: OffloadBinary.h:32
llvm::RISCVFenceField::O
@ O
Definition: RISCVBaseInfo.h:264
object
bar al al movzbl eax ret Missed when stored in a memory object
Definition: README.txt:1411
llvm::OffloadYAML::Binary::Version
Optional< uint32_t > Version
Definition: OffloadYAML.h:40
llvm::OffloadYAML::Binary::Member::ImageKind
Optional< object::ImageKind > ImageKind
Definition: OffloadYAML.h:33
llvm::OffloadYAML::Binary::Member::Flags
Optional< uint32_t > Flags
Definition: OffloadYAML.h:35
llvm::OffloadYAML::Binary::Member::Content
Optional< yaml::BinaryRef > Content
Definition: OffloadYAML.h:37
YAMLTraits.h
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
OffloadBinary.h
llvm::OffloadYAML::Binary::Member::OffloadKind
Optional< object::OffloadKind > OffloadKind
Definition: OffloadYAML.h:34
llvm::OffloadYAML::Binary::Member
Definition: OffloadYAML.h:32
llvm::OffloadYAML::Binary::Member::StringEntries
Optional< std::vector< StringEntry > > StringEntries
Definition: OffloadYAML.h:36
llvm::OffloadYAML::Binary::Members
std::vector< Member > Members
Definition: OffloadYAML.h:44
llvm::OffloadYAML::Binary::EntrySize
Optional< uint64_t > EntrySize
Definition: OffloadYAML.h:43
llvm::OffloadYAML::Binary::EntryOffset
Optional< uint64_t > EntryOffset
Definition: OffloadYAML.h:42
llvm::Value
LLVM Value Representation.
Definition: Value.h:74
llvm::OffloadYAML::Binary
Definition: OffloadYAML.h:26
llvm::object::ImageKind
ImageKind
The type of contents the offloading image contains.
Definition: OffloadBinary.h:41