15 #ifndef LLVM_CODEGEN_MIRYAMLMAPPING_H 16 #define LLVM_CODEGEN_MIRYAMLMAPPING_H 42 return Value == Other.
Value;
53 if (
const auto *
Node =
54 reinterpret_cast<yaml::Input *>(Ctx)->getCurrentNode())
83 return Value == Other.
Value;
107 return Value == Other.
Value;
113 return ScalarTraits<unsigned>::output(Value.
Value, Ctx, OS);
117 if (
const auto *
Node =
118 reinterpret_cast<yaml::Input *>(Ctx)->getCurrentNode())
120 return ScalarTraits<unsigned>::input(Scalar, Ctx, Value.
Value);
124 return ScalarTraits<unsigned>::mustQuote(Scalar);
131 IO.enumCase(EntryKind,
"block-address",
133 IO.enumCase(EntryKind,
"gp-rel64-block-address",
135 IO.enumCase(EntryKind,
"gp-rel32-block-address",
137 IO.enumCase(EntryKind,
"label-difference32",
162 return ID == Other.
ID && Class == Other.
Class &&
169 YamlIO.mapRequired(
"id", Reg.
ID);
170 YamlIO.mapRequired(
"class", Reg.
Class);
175 static const bool flow =
true;
183 return Register == Other.
Register &&
190 YamlIO.mapRequired(
"reg", LiveIn.
Register);
196 static const bool flow =
true;
214 unsigned Alignment = 0;
217 bool CalleeSavedRestored =
true;
224 return ID == Other.
ID && Name == Other.
Name && Type == Other.
Type &&
225 Offset == Other.
Offset && Size == Other.
Size &&
245 YamlIO.mapRequired(
"id", Object.
ID);
246 YamlIO.mapOptional(
"name", Object.
Name,
251 YamlIO.mapOptional(
"offset", Object.
Offset, (int64_t)0);
253 YamlIO.mapRequired(
"size", Object.
Size);
254 YamlIO.mapOptional(
"alignment", Object.
Alignment, (
unsigned)0);
255 YamlIO.mapOptional(
"stack-id", Object.
StackID);
261 YamlIO.mapOptional(
"debug-info-variable", Object.
DebugVar,
263 YamlIO.mapOptional(
"debug-info-expression", Object.
DebugExpr,
265 YamlIO.mapOptional(
"debug-info-location", Object.
DebugLoc,
269 static const bool flow =
true;
280 unsigned Alignment = 0;
282 bool IsImmutable =
false;
283 bool IsAliased =
false;
285 bool CalleeSavedRestored =
true;
291 return ID == Other.
ID && Type == Other.
Type && Offset == Other.
Offset &&
313 YamlIO.mapRequired(
"id", Object.
ID);
317 YamlIO.mapOptional(
"offset", Object.
Offset, (int64_t)0);
318 YamlIO.mapOptional(
"size", Object.
Size, (uint64_t)0);
319 YamlIO.mapOptional(
"alignment", Object.
Alignment, (
unsigned)0);
320 YamlIO.mapOptional(
"stack-id", Object.
StackID);
322 YamlIO.mapOptional(
"isImmutable", Object.
IsImmutable,
false);
323 YamlIO.mapOptional(
"isAliased", Object.
IsAliased,
false);
329 YamlIO.mapOptional(
"debug-info-variable", Object.
DebugVar,
331 YamlIO.mapOptional(
"debug-info-expression", Object.
DebugExpr,
333 YamlIO.mapOptional(
"debug-info-location", Object.
DebugLoc,
337 static const bool flow =
true;
343 unsigned Alignment = 0;
344 bool IsTargetSpecific =
false;
347 return ID == Other.
ID && Value == Other.
Value &&
355 YamlIO.mapRequired(
"id", Constant.
ID);
357 YamlIO.mapOptional(
"alignment", Constant.
Alignment, (
unsigned)0);
368 return ID == Other.
ID && Blocks == Other.
Blocks;
376 return Kind == Other.
Kind && Entries == Other.
Entries;
382 YamlIO.mapRequired(
"id", Entry.
ID);
383 YamlIO.mapOptional(
"blocks", Entry.
Blocks, std::vector<FlowStringValue>());
402 YamlIO.mapRequired(
"kind", JT.
Kind);
403 YamlIO.mapOptional(
"entries", JT.
Entries,
404 std::vector<MachineJumpTable::Entry>());
416 bool IsFrameAddressTaken =
false;
417 bool IsReturnAddressTaken =
false;
418 bool HasStackMap =
false;
419 bool HasPatchPoint =
false;
420 uint64_t StackSize = 0;
421 int OffsetAdjustment = 0;
422 unsigned MaxAlignment = 0;
423 bool AdjustsStack =
false;
427 unsigned MaxCallFrameSize = ~0u;
428 unsigned CVBytesOfCalleeSavedRegisters = 0;
429 bool HasOpaqueSPAdjustment =
false;
430 bool HasVAStart =
false;
431 bool HasMustTailInVarArgFunc =
false;
432 unsigned LocalFrameSize = 0;
447 CVBytesOfCalleeSavedRegisters ==
461 YamlIO.mapOptional(
"hasStackMap", MFI.
HasStackMap,
false);
462 YamlIO.mapOptional(
"hasPatchPoint", MFI.
HasPatchPoint,
false);
463 YamlIO.mapOptional(
"stackSize", MFI.
StackSize, (uint64_t)0);
465 YamlIO.mapOptional(
"maxAlignment", MFI.
MaxAlignment, (
unsigned)0);
466 YamlIO.mapOptional(
"adjustsStack", MFI.
AdjustsStack,
false);
467 YamlIO.mapOptional(
"hasCalls", MFI.
HasCalls,
false);
471 YamlIO.mapOptional(
"cvBytesOfCalleeSavedRegisters",
475 YamlIO.mapOptional(
"hasVAStart", MFI.
HasVAStart,
false);
478 YamlIO.mapOptional(
"localFrameSize", MFI.
LocalFrameSize, (
unsigned)0);
479 YamlIO.mapOptional(
"savePoint", MFI.
SavePoint,
488 unsigned Alignment = 0;
489 bool ExposesReturnsTwice =
false;
491 bool Legalized =
false;
492 bool RegBankSelected =
false;
493 bool Selected =
false;
494 bool FailedISel =
false;
496 bool TracksRegLiveness =
false;
497 bool HasWinCFI =
false;
513 YamlIO.mapRequired(
"name", MF.
Name);
514 YamlIO.mapOptional(
"alignment", MF.
Alignment, (
unsigned)0);
516 YamlIO.mapOptional(
"legalized", MF.
Legalized,
false);
518 YamlIO.mapOptional(
"selected", MF.
Selected,
false);
519 YamlIO.mapOptional(
"failedISel", MF.
FailedISel,
false);
521 YamlIO.mapOptional(
"hasWinCFI", MF.
HasWinCFI,
false);
523 std::vector<VirtualRegisterDefinition>());
524 YamlIO.mapOptional(
"liveins", MF.
LiveIns,
525 std::vector<MachineFunctionLiveIn>());
527 Optional<std::vector<FlowStringValue>>());
530 std::vector<FixedMachineStackObject>());
532 std::vector<MachineStackObject>());
533 YamlIO.mapOptional(
"constants", MF.
Constants,
534 std::vector<MachineConstantPoolValue>());
544 #endif // LLVM_CODEGEN_MIRYAMLMAPPING_H
Represents a range in source code.
StringValue VirtualRegister
LLVM_NODISCARD std::string str() const
str - Get the contents as an std::string.
This class represents lattice values for constants.
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)
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...
StringValue CalleeSavedRegister
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
bool HasMustTailInVarArgFunc
unsigned CVBytesOfCalleeSavedRegisters
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...
This is an important base class in LLVM.
static void mapping(IO &YamlIO, MachineFunctionLiveIn &LiveIn)
MachineJumpTable JumpTableInfo
Constant pool.
unsigned MaxCallFrameSize
~0u means: not computed yet.
StringValue StackProtector
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)
StringValue CalleeSavedRegister
static StringRef input(StringRef Scalar, void *Ctx, BlockStringValue &S)
Optional< int64_t > LocalOffset
StringValue PreferredRegister
MachineFrameInfo FrameInfo
static void mapping(IO &YamlIO, MachineFrameInfo &MFI)
bool HasOpaqueSPAdjustment
static void mapping(IO &YamlIO, VirtualRegisterDefinition &Reg)
A wrapper around std::string which contains a source range that'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's being set during parsing.
std::vector< Entry > Entries
static void mapping(IO &YamlIO, MachineJumpTable &JT)
bool IsReturnAddressTaken
static QuotingType mustQuote(StringRef S)
std::vector< MachineConstantPoolValue > Constants
bool operator==(const BlockStringValue &Other) const
bool operator==(const FixedMachineStackObject &Other) const
static void output(const StringValue &S, void *, raw_ostream &OS)
std::vector< FixedMachineStackObject > FixedStackObjects
LLVM Value Representation.
bool operator==(const MachineJumpTable &Other) const
This class implements an extremely fast bulk output stream that can only output to a stream...
StringRef - Represent a constant reference to a string, i.e.
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
Abstract base class for all Nodes.