LLVM  9.0.0svn
MIRYamlMapping.h
Go to the documentation of this file.
1 //===- MIRYamlMapping.h - Describes the mapping between MIR and YAML ------===//
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 implements the mapping between various MIR data structures and
10 // their corresponding YAML representation.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CODEGEN_MIRYAMLMAPPING_H
15 #define LLVM_CODEGEN_MIRYAMLMAPPING_H
16 
17 #include "llvm/ADT/Optional.h"
18 #include "llvm/ADT/StringRef.h"
20 #include "llvm/Support/SMLoc.h"
23 #include <algorithm>
24 #include <cstdint>
25 #include <string>
26 #include <vector>
27 
28 namespace llvm {
29 namespace yaml {
30 
31 /// A wrapper around std::string which contains a source range that's being
32 /// set during parsing.
33 struct StringValue {
34  std::string Value;
36 
37  StringValue() = default;
38  StringValue(std::string Value) : Value(std::move(Value)) {}
39 
40  bool operator==(const StringValue &Other) const {
41  return Value == Other.Value;
42  }
43 };
44 
45 template <> struct ScalarTraits<StringValue> {
46  static void output(const StringValue &S, void *, raw_ostream &OS) {
47  OS << S.Value;
48  }
49 
50  static StringRef input(StringRef Scalar, void *Ctx, StringValue &S) {
51  S.Value = Scalar.str();
52  if (const auto *Node =
53  reinterpret_cast<yaml::Input *>(Ctx)->getCurrentNode())
55  return "";
56  }
57 
58  static QuotingType mustQuote(StringRef S) { return needsQuotes(S); }
59 };
60 
62  FlowStringValue() = default;
63  FlowStringValue(std::string Value) : StringValue(std::move(Value)) {}
64 };
65 
66 template <> struct ScalarTraits<FlowStringValue> {
67  static void output(const FlowStringValue &S, void *, raw_ostream &OS) {
68  return ScalarTraits<StringValue>::output(S, nullptr, OS);
69  }
70 
71  static StringRef input(StringRef Scalar, void *Ctx, FlowStringValue &S) {
72  return ScalarTraits<StringValue>::input(Scalar, Ctx, S);
73  }
74 
75  static QuotingType mustQuote(StringRef S) { return needsQuotes(S); }
76 };
77 
80 
81  bool operator==(const BlockStringValue &Other) const {
82  return Value == Other.Value;
83  }
84 };
85 
86 template <> struct BlockScalarTraits<BlockStringValue> {
87  static void output(const BlockStringValue &S, void *Ctx, raw_ostream &OS) {
88  return ScalarTraits<StringValue>::output(S.Value, Ctx, OS);
89  }
90 
91  static StringRef input(StringRef Scalar, void *Ctx, BlockStringValue &S) {
92  return ScalarTraits<StringValue>::input(Scalar, Ctx, S.Value);
93  }
94 };
95 
96 /// A wrapper around unsigned which contains a source range that's being set
97 /// during parsing.
98 struct UnsignedValue {
99  unsigned Value = 0;
101 
102  UnsignedValue() = default;
103  UnsignedValue(unsigned Value) : Value(Value) {}
104 
105  bool operator==(const UnsignedValue &Other) const {
106  return Value == Other.Value;
107  }
108 };
109 
110 template <> struct ScalarTraits<UnsignedValue> {
111  static void output(const UnsignedValue &Value, void *Ctx, raw_ostream &OS) {
112  return ScalarTraits<unsigned>::output(Value.Value, Ctx, OS);
113  }
114 
116  if (const auto *Node =
117  reinterpret_cast<yaml::Input *>(Ctx)->getCurrentNode())
118  Value.SourceRange = Node->getSourceRange();
119  return ScalarTraits<unsigned>::input(Scalar, Ctx, Value.Value);
120  }
121 
122  static QuotingType mustQuote(StringRef Scalar) {
123  return ScalarTraits<unsigned>::mustQuote(Scalar);
124  }
125 };
126 
127 template <> struct ScalarEnumerationTraits<MachineJumpTableInfo::JTEntryKind> {
128  static void enumeration(yaml::IO &IO,
130  IO.enumCase(EntryKind, "block-address",
132  IO.enumCase(EntryKind, "gp-rel64-block-address",
134  IO.enumCase(EntryKind, "gp-rel32-block-address",
136  IO.enumCase(EntryKind, "label-difference32",
138  IO.enumCase(EntryKind, "inline", MachineJumpTableInfo::EK_Inline);
139  IO.enumCase(EntryKind, "custom32", MachineJumpTableInfo::EK_Custom32);
140  }
141 };
142 
143 } // end namespace yaml
144 } // end namespace llvm
145 
146 LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::StringValue)
147 LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(llvm::yaml::FlowStringValue)
148 LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(llvm::yaml::UnsignedValue)
149 
150 namespace llvm {
151 namespace yaml {
152 
157 
158  // TODO: Serialize the target specific register hints.
159 
160  bool operator==(const VirtualRegisterDefinition &Other) const {
161  return ID == Other.ID && Class == Other.Class &&
162  PreferredRegister == Other.PreferredRegister;
163  }
164 };
165 
167  static void mapping(IO &YamlIO, VirtualRegisterDefinition &Reg) {
168  YamlIO.mapRequired("id", Reg.ID);
169  YamlIO.mapRequired("class", Reg.Class);
170  YamlIO.mapOptional("preferred-register", Reg.PreferredRegister,
171  StringValue()); // Don't print out when it's empty.
172  }
173 
174  static const bool flow = true;
175 };
176 
180 
181  bool operator==(const MachineFunctionLiveIn &Other) const {
182  return Register == Other.Register &&
183  VirtualRegister == Other.VirtualRegister;
184  }
185 };
186 
188  static void mapping(IO &YamlIO, MachineFunctionLiveIn &LiveIn) {
189  YamlIO.mapRequired("reg", LiveIn.Register);
190  YamlIO.mapOptional(
191  "virtual-reg", LiveIn.VirtualRegister,
192  StringValue()); // Don't print the virtual register when it's empty.
193  }
194 
195  static const bool flow = true;
196 };
197 
198 /// Serializable representation of stack object from the MachineFrameInfo class.
199 ///
200 /// The flags 'isImmutable' and 'isAliased' aren't serialized, as they are
201 /// determined by the object's type and frame information flags.
202 /// Dead stack objects aren't serialized.
203 ///
204 /// The 'isPreallocated' flag is determined by the local offset.
206  enum ObjectType { DefaultType, SpillSlot, VariableSized };
209  // TODO: Serialize unnamed LLVM alloca reference.
210  ObjectType Type = DefaultType;
211  int64_t Offset = 0;
212  uint64_t Size = 0;
213  unsigned Alignment = 0;
214  uint8_t StackID = 0;
216  bool CalleeSavedRestored = true;
221 
222  bool operator==(const MachineStackObject &Other) const {
223  return ID == Other.ID && Name == Other.Name && Type == Other.Type &&
224  Offset == Other.Offset && Size == Other.Size &&
225  Alignment == Other.Alignment &&
226  StackID == Other.StackID &&
227  CalleeSavedRegister == Other.CalleeSavedRegister &&
228  CalleeSavedRestored == Other.CalleeSavedRestored &&
229  LocalOffset == Other.LocalOffset && DebugVar == Other.DebugVar &&
230  DebugExpr == Other.DebugExpr && DebugLoc == Other.DebugLoc;
231  }
232 };
233 
234 template <> struct ScalarEnumerationTraits<MachineStackObject::ObjectType> {
235  static void enumeration(yaml::IO &IO, MachineStackObject::ObjectType &Type) {
236  IO.enumCase(Type, "default", MachineStackObject::DefaultType);
237  IO.enumCase(Type, "spill-slot", MachineStackObject::SpillSlot);
238  IO.enumCase(Type, "variable-sized", MachineStackObject::VariableSized);
239  }
240 };
241 
242 template <> struct MappingTraits<MachineStackObject> {
243  static void mapping(yaml::IO &YamlIO, MachineStackObject &Object) {
244  YamlIO.mapRequired("id", Object.ID);
245  YamlIO.mapOptional("name", Object.Name,
246  StringValue()); // Don't print out an empty name.
247  YamlIO.mapOptional(
248  "type", Object.Type,
249  MachineStackObject::DefaultType); // Don't print the default type.
250  YamlIO.mapOptional("offset", Object.Offset, (int64_t)0);
252  YamlIO.mapRequired("size", Object.Size);
253  YamlIO.mapOptional("alignment", Object.Alignment, (unsigned)0);
254  YamlIO.mapOptional("stack-id", Object.StackID);
255  YamlIO.mapOptional("callee-saved-register", Object.CalleeSavedRegister,
256  StringValue()); // Don't print it out when it's empty.
257  YamlIO.mapOptional("callee-saved-restored", Object.CalleeSavedRestored,
258  true);
259  YamlIO.mapOptional("local-offset", Object.LocalOffset, Optional<int64_t>());
260  YamlIO.mapOptional("debug-info-variable", Object.DebugVar,
261  StringValue()); // Don't print it out when it's empty.
262  YamlIO.mapOptional("debug-info-expression", Object.DebugExpr,
263  StringValue()); // Don't print it out when it's empty.
264  YamlIO.mapOptional("debug-info-location", Object.DebugLoc,
265  StringValue()); // Don't print it out when it's empty.
266  }
267 
268  static const bool flow = true;
269 };
270 
271 /// Serializable representation of the fixed stack object from the
272 /// MachineFrameInfo class.
274  enum ObjectType { DefaultType, SpillSlot };
276  ObjectType Type = DefaultType;
277  int64_t Offset = 0;
278  uint64_t Size = 0;
279  unsigned Alignment = 0;
280  uint8_t StackID = 0;
281  bool IsImmutable = false;
282  bool IsAliased = false;
284  bool CalleeSavedRestored = true;
288 
289  bool operator==(const FixedMachineStackObject &Other) const {
290  return ID == Other.ID && Type == Other.Type && Offset == Other.Offset &&
291  Size == Other.Size && Alignment == Other.Alignment &&
292  StackID == Other.StackID &&
293  IsImmutable == Other.IsImmutable && IsAliased == Other.IsAliased &&
294  CalleeSavedRegister == Other.CalleeSavedRegister &&
295  CalleeSavedRestored == Other.CalleeSavedRestored &&
296  DebugVar == Other.DebugVar && DebugExpr == Other.DebugExpr
297  && DebugLoc == Other.DebugLoc;
298  }
299 };
300 
301 template <>
302 struct ScalarEnumerationTraits<FixedMachineStackObject::ObjectType> {
303  static void enumeration(yaml::IO &IO,
305  IO.enumCase(Type, "default", FixedMachineStackObject::DefaultType);
306  IO.enumCase(Type, "spill-slot", FixedMachineStackObject::SpillSlot);
307  }
308 };
309 
311  static void mapping(yaml::IO &YamlIO, FixedMachineStackObject &Object) {
312  YamlIO.mapRequired("id", Object.ID);
313  YamlIO.mapOptional(
314  "type", Object.Type,
315  FixedMachineStackObject::DefaultType); // Don't print the default type.
316  YamlIO.mapOptional("offset", Object.Offset, (int64_t)0);
317  YamlIO.mapOptional("size", Object.Size, (uint64_t)0);
318  YamlIO.mapOptional("alignment", Object.Alignment, (unsigned)0);
319  YamlIO.mapOptional("stack-id", Object.StackID);
321  YamlIO.mapOptional("isImmutable", Object.IsImmutable, false);
322  YamlIO.mapOptional("isAliased", Object.IsAliased, false);
323  }
324  YamlIO.mapOptional("callee-saved-register", Object.CalleeSavedRegister,
325  StringValue()); // Don't print it out when it's empty.
326  YamlIO.mapOptional("callee-saved-restored", Object.CalleeSavedRestored,
327  true);
328  YamlIO.mapOptional("debug-info-variable", Object.DebugVar,
329  StringValue()); // Don't print it out when it's empty.
330  YamlIO.mapOptional("debug-info-expression", Object.DebugExpr,
331  StringValue()); // Don't print it out when it's empty.
332  YamlIO.mapOptional("debug-info-location", Object.DebugLoc,
333  StringValue()); // Don't print it out when it's empty.
334  }
335 
336  static const bool flow = true;
337 };
338 
342  unsigned Alignment = 0;
343  bool IsTargetSpecific = false;
344 
345  bool operator==(const MachineConstantPoolValue &Other) const {
346  return ID == Other.ID && Value == Other.Value &&
347  Alignment == Other.Alignment &&
348  IsTargetSpecific == Other.IsTargetSpecific;
349  }
350 };
351 
353  static void mapping(IO &YamlIO, MachineConstantPoolValue &Constant) {
354  YamlIO.mapRequired("id", Constant.ID);
355  YamlIO.mapOptional("value", Constant.Value, StringValue());
356  YamlIO.mapOptional("alignment", Constant.Alignment, (unsigned)0);
357  YamlIO.mapOptional("isTargetSpecific", Constant.IsTargetSpecific, false);
358  }
359 };
360 
362  struct Entry {
364  std::vector<FlowStringValue> Blocks;
365 
366  bool operator==(const Entry &Other) const {
367  return ID == Other.ID && Blocks == Other.Blocks;
368  }
369  };
370 
372  std::vector<Entry> Entries;
373 
374  bool operator==(const MachineJumpTable &Other) const {
375  return Kind == Other.Kind && Entries == Other.Entries;
376  }
377 };
378 
379 template <> struct MappingTraits<MachineJumpTable::Entry> {
380  static void mapping(IO &YamlIO, MachineJumpTable::Entry &Entry) {
381  YamlIO.mapRequired("id", Entry.ID);
382  YamlIO.mapOptional("blocks", Entry.Blocks, std::vector<FlowStringValue>());
383  }
384 };
385 
386 } // end namespace yaml
387 } // end namespace llvm
388 
389 LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::MachineFunctionLiveIn)
390 LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::VirtualRegisterDefinition)
391 LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::MachineStackObject)
392 LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::FixedMachineStackObject)
393 LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::MachineConstantPoolValue)
394 LLVM_YAML_IS_SEQUENCE_VECTOR(llvm::yaml::MachineJumpTable::Entry)
395 
396 namespace llvm {
397 namespace yaml {
398 
399 template <> struct MappingTraits<MachineJumpTable> {
400  static void mapping(IO &YamlIO, MachineJumpTable &JT) {
401  YamlIO.mapRequired("kind", JT.Kind);
402  YamlIO.mapOptional("entries", JT.Entries,
403  std::vector<MachineJumpTable::Entry>());
404  }
405 };
406 
407 /// Serializable representation of MachineFrameInfo.
408 ///
409 /// Doesn't serialize attributes like 'StackAlignment', 'IsStackRealignable' and
410 /// 'RealignOption' as they are determined by the target and LLVM function
411 /// attributes.
412 /// It also doesn't serialize attributes like 'NumFixedObject' and
413 /// 'HasVarSizedObjects' as they are determined by the frame objects themselves.
415  bool IsFrameAddressTaken = false;
416  bool IsReturnAddressTaken = false;
417  bool HasStackMap = false;
418  bool HasPatchPoint = false;
419  uint64_t StackSize = 0;
420  int OffsetAdjustment = 0;
421  unsigned MaxAlignment = 0;
422  bool AdjustsStack = false;
423  bool HasCalls = false;
425  // TODO: Serialize FunctionContextIdx
426  unsigned MaxCallFrameSize = ~0u; ///< ~0u means: not computed yet.
427  unsigned CVBytesOfCalleeSavedRegisters = 0;
428  bool HasOpaqueSPAdjustment = false;
429  bool HasVAStart = false;
430  bool HasMustTailInVarArgFunc = false;
431  unsigned LocalFrameSize = 0;
434 
435  bool operator==(const MachineFrameInfo &Other) const {
436  return IsFrameAddressTaken == Other.IsFrameAddressTaken &&
437  IsReturnAddressTaken == Other.IsReturnAddressTaken &&
438  HasStackMap == Other.HasStackMap &&
439  HasPatchPoint == Other.HasPatchPoint &&
440  StackSize == Other.StackSize &&
441  OffsetAdjustment == Other.OffsetAdjustment &&
442  MaxAlignment == Other.MaxAlignment &&
443  AdjustsStack == Other.AdjustsStack && HasCalls == Other.HasCalls &&
444  StackProtector == Other.StackProtector &&
445  MaxCallFrameSize == Other.MaxCallFrameSize &&
446  CVBytesOfCalleeSavedRegisters ==
448  HasOpaqueSPAdjustment == Other.HasOpaqueSPAdjustment &&
449  HasVAStart == Other.HasVAStart &&
450  HasMustTailInVarArgFunc == Other.HasMustTailInVarArgFunc &&
451  LocalFrameSize == Other.LocalFrameSize &&
452  SavePoint == Other.SavePoint && RestorePoint == Other.RestorePoint;
453  }
454 };
455 
456 template <> struct MappingTraits<MachineFrameInfo> {
457  static void mapping(IO &YamlIO, MachineFrameInfo &MFI) {
458  YamlIO.mapOptional("isFrameAddressTaken", MFI.IsFrameAddressTaken, false);
459  YamlIO.mapOptional("isReturnAddressTaken", MFI.IsReturnAddressTaken, false);
460  YamlIO.mapOptional("hasStackMap", MFI.HasStackMap, false);
461  YamlIO.mapOptional("hasPatchPoint", MFI.HasPatchPoint, false);
462  YamlIO.mapOptional("stackSize", MFI.StackSize, (uint64_t)0);
463  YamlIO.mapOptional("offsetAdjustment", MFI.OffsetAdjustment, (int)0);
464  YamlIO.mapOptional("maxAlignment", MFI.MaxAlignment, (unsigned)0);
465  YamlIO.mapOptional("adjustsStack", MFI.AdjustsStack, false);
466  YamlIO.mapOptional("hasCalls", MFI.HasCalls, false);
467  YamlIO.mapOptional("stackProtector", MFI.StackProtector,
468  StringValue()); // Don't print it out when it's empty.
469  YamlIO.mapOptional("maxCallFrameSize", MFI.MaxCallFrameSize, (unsigned)~0);
470  YamlIO.mapOptional("cvBytesOfCalleeSavedRegisters",
472  YamlIO.mapOptional("hasOpaqueSPAdjustment", MFI.HasOpaqueSPAdjustment,
473  false);
474  YamlIO.mapOptional("hasVAStart", MFI.HasVAStart, false);
475  YamlIO.mapOptional("hasMustTailInVarArgFunc", MFI.HasMustTailInVarArgFunc,
476  false);
477  YamlIO.mapOptional("localFrameSize", MFI.LocalFrameSize, (unsigned)0);
478  YamlIO.mapOptional("savePoint", MFI.SavePoint,
479  StringValue()); // Don't print it out when it's empty.
480  YamlIO.mapOptional("restorePoint", MFI.RestorePoint,
481  StringValue()); // Don't print it out when it's empty.
482  }
483 };
484 
487  unsigned Alignment = 0;
488  bool ExposesReturnsTwice = false;
489  // GISel MachineFunctionProperties.
490  bool Legalized = false;
491  bool RegBankSelected = false;
492  bool Selected = false;
493  bool FailedISel = false;
494  // Register information
495  bool TracksRegLiveness = false;
496  bool HasWinCFI = false;
497  std::vector<VirtualRegisterDefinition> VirtualRegisters;
498  std::vector<MachineFunctionLiveIn> LiveIns;
500  // TODO: Serialize the various register masks.
501  // Frame information
503  std::vector<FixedMachineStackObject> FixedStackObjects;
504  std::vector<MachineStackObject> StackObjects;
505  std::vector<MachineConstantPoolValue> Constants; /// Constant pool.
508 };
509 
510 template <> struct MappingTraits<MachineFunction> {
511  static void mapping(IO &YamlIO, MachineFunction &MF) {
512  YamlIO.mapRequired("name", MF.Name);
513  YamlIO.mapOptional("alignment", MF.Alignment, (unsigned)0);
514  YamlIO.mapOptional("exposesReturnsTwice", MF.ExposesReturnsTwice, false);
515  YamlIO.mapOptional("legalized", MF.Legalized, false);
516  YamlIO.mapOptional("regBankSelected", MF.RegBankSelected, false);
517  YamlIO.mapOptional("selected", MF.Selected, false);
518  YamlIO.mapOptional("failedISel", MF.FailedISel, false);
519  YamlIO.mapOptional("tracksRegLiveness", MF.TracksRegLiveness, false);
520  YamlIO.mapOptional("hasWinCFI", MF.HasWinCFI, false);
521  YamlIO.mapOptional("registers", MF.VirtualRegisters,
522  std::vector<VirtualRegisterDefinition>());
523  YamlIO.mapOptional("liveins", MF.LiveIns,
524  std::vector<MachineFunctionLiveIn>());
525  YamlIO.mapOptional("calleeSavedRegisters", MF.CalleeSavedRegisters,
526  Optional<std::vector<FlowStringValue>>());
527  YamlIO.mapOptional("frameInfo", MF.FrameInfo, MachineFrameInfo());
528  YamlIO.mapOptional("fixedStack", MF.FixedStackObjects,
529  std::vector<FixedMachineStackObject>());
530  YamlIO.mapOptional("stack", MF.StackObjects,
531  std::vector<MachineStackObject>());
532  YamlIO.mapOptional("constants", MF.Constants,
533  std::vector<MachineConstantPoolValue>());
534  if (!YamlIO.outputting() || !MF.JumpTableInfo.Entries.empty())
535  YamlIO.mapOptional("jumpTable", MF.JumpTableInfo, MachineJumpTable());
536  YamlIO.mapOptional("body", MF.Body, BlockStringValue());
537  }
538 };
539 
540 } // end namespace yaml
541 } // end namespace llvm
542 
543 #endif // LLVM_CODEGEN_MIRYAMLMAPPING_H
Represents a range in source code.
Definition: SMLoc.h:48
LLVM_NODISCARD std::string str() const
str - Get the contents as an std::string.
Definition: StringRef.h:218
This class represents lattice values for constants.
Definition: AllocatorList.h:23
static StringRef input(StringRef Scalar, void *Ctx, StringValue &S)
static void mapping(IO &YamlIO, MachineConstantPoolValue &Constant)
static void output(const FlowStringValue &S, void *, raw_ostream &OS)
Optional< std::vector< FlowStringValue > > CalleeSavedRegisters
static QuotingType mustQuote(StringRef S)
unsigned Reg
EK_Inline - Jump table entries are emitted inline at their point of use.
FlowStringValue(std::string Value)
static QuotingType mustQuote(StringRef Scalar)
static void output(const UnsignedValue &Value, void *Ctx, raw_ostream &OS)
bool operator==(const Entry &Other) const
static void enumeration(yaml::IO &IO, MachineStackObject::ObjectType &Type)
static void enumeration(yaml::IO &IO, FixedMachineStackObject::ObjectType &Type)
static void mapping(yaml::IO &YamlIO, FixedMachineStackObject &Object)
JTEntryKind
JTEntryKind - This enum indicates how each entry of the jump table is represented and emitted...
Definition: BitVector.h:937
Serializable representation of the fixed stack object from the MachineFrameInfo class.
bool operator==(const MachineFrameInfo &Other) const
static void mapping(IO &YamlIO, MachineFunction &MF)
std::vector< VirtualRegisterDefinition > VirtualRegisters
EK_LabelDifference32 - Each entry is the address of the block minus the address of the jump table...
static void mapping(IO &YamlIO, MachineJumpTable::Entry &Entry)
bool operator==(const StringValue &Other) const
EK_BlockAddress - Each entry is a plain address of block, e.g.
bool operator==(const MachineConstantPoolValue &Other) const
static StringRef input(StringRef Scalar, void *Ctx, UnsignedValue &Value)
EK_GPRel64BlockAddress - Each entry is an address of block, encoded with a relocation as gp-relative...
std::vector< FlowStringValue > Blocks
EK_Custom32 - Each entry is a 32-bit value that is custom lowered by the TargetLowering::LowerCustomJ...
Serializable representation of stack object from the MachineFrameInfo class.
The instances of the Type class are immutable: once they are created, they are never changed...
Definition: Type.h:45
This is an important base class in LLVM.
Definition: Constant.h:41
static void mapping(IO &YamlIO, MachineFunctionLiveIn &LiveIn)
MachineJumpTable JumpTableInfo
Constant pool.
unsigned MaxCallFrameSize
~0u means: not computed yet.
std::vector< MachineStackObject > StackObjects
Serializable representation of MachineFrameInfo.
bool operator==(const UnsignedValue &Other) const
StringValue(std::string Value)
static void mapping(yaml::IO &YamlIO, MachineStackObject &Object)
static StringRef input(StringRef Scalar, void *Ctx, BlockStringValue &S)
Optional< int64_t > LocalOffset
static void mapping(IO &YamlIO, MachineFrameInfo &MFI)
static void mapping(IO &YamlIO, VirtualRegisterDefinition &Reg)
A wrapper around std::string which contains a source range that&#39;s being set during parsing...
std::vector< MachineFunctionLiveIn > LiveIns
static void enumeration(yaml::IO &IO, MachineJumpTableInfo::JTEntryKind &EntryKind)
bool operator==(const MachineStackObject &Other) const
static StringRef input(StringRef Scalar, void *Ctx, FlowStringValue &S)
A wrapper around unsigned which contains a source range that&#39;s being set during parsing.
std::vector< Entry > Entries
static void mapping(IO &YamlIO, MachineJumpTable &JT)
static QuotingType mustQuote(StringRef S)
std::vector< MachineConstantPoolValue > Constants
uint32_t Size
Definition: Profile.cpp:46
bool operator==(const BlockStringValue &Other) const
bool operator==(const FixedMachineStackObject &Other) const
static void output(const StringValue &S, void *, raw_ostream &OS)
const unsigned Kind
std::vector< FixedMachineStackObject > FixedStackObjects
LLVM Value Representation.
Definition: Value.h:72
bool operator==(const MachineJumpTable &Other) const
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:45
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:48
UnsignedValue(unsigned Value)
EK_GPRel32BlockAddress - Each entry is an address of block, encoded with a relocation as gp-relative...
MachineJumpTableInfo::JTEntryKind Kind
static void output(const BlockStringValue &S, void *Ctx, raw_ostream &OS)
bool operator==(const VirtualRegisterDefinition &Other) const
bool operator==(const MachineFunctionLiveIn &Other) const
SMRange getSourceRange() const
Definition: YAMLParser.h:159
Abstract base class for all Nodes.
Definition: YAMLParser.h:113