15 #ifndef LLVM_LIB_CODEGEN_MIRYAMLMAPPING_H
16 #define LLVM_LIB_CODEGEN_MIRYAMLMAPPING_H
47 if (
const auto *
Node =
48 reinterpret_cast<yaml::Input *>(Ctx)->getCurrentNode())
107 if (
const auto *
Node =
108 reinterpret_cast<yaml::Input *>(Ctx)->getCurrentNode())
121 IO.
enumCase(EntryKind,
"block-address",
123 IO.
enumCase(EntryKind,
"gp-rel64-block-address",
125 IO.
enumCase(EntryKind,
"gp-rel32-block-address",
127 IO.
enumCase(EntryKind,
"label-difference32",
159 static const bool flow =
true;
175 static const bool flow =
true;
193 unsigned Alignment = 0;
203 IO.
enumCase(Type,
"default", MachineStackObject::DefaultType);
204 IO.
enumCase(Type,
"spill-slot", MachineStackObject::SpillSlot);
205 IO.
enumCase(Type,
"variable-sized", MachineStackObject::VariableSized);
216 MachineStackObject::DefaultType);
218 if (Object.
Type != MachineStackObject::VariableSized)
232 static const bool flow =
true;
243 unsigned Alignment = 0;
244 bool IsImmutable =
false;
245 bool IsAliased =
false;
253 IO.
enumCase(Type,
"default", FixedMachineStackObject::DefaultType);
254 IO.
enumCase(Type,
"spill-slot", FixedMachineStackObject::SpillSlot);
263 FixedMachineStackObject::DefaultType);
267 if (Object.
Type != FixedMachineStackObject::SpillSlot) {
275 static const bool flow =
true;
281 unsigned Alignment = 0;
337 bool IsFrameAddressTaken =
false;
338 bool IsReturnAddressTaken =
false;
339 bool HasStackMap =
false;
340 bool HasPatchPoint =
false;
341 uint64_t StackSize = 0;
342 int OffsetAdjustment = 0;
343 unsigned MaxAlignment = 0;
344 bool AdjustsStack =
false;
345 bool HasCalls =
false;
348 unsigned MaxCallFrameSize = 0;
349 bool HasOpaqueSPAdjustment =
false;
350 bool HasVAStart =
false;
351 bool HasMustTailInVarArgFunc =
false;
382 unsigned Alignment = 0;
383 bool ExposesReturnsTwice =
false;
385 bool Legalized =
false;
386 bool RegBankSelected =
false;
387 bool Selected =
false;
389 bool TracksRegLiveness =
false;
Represents a range in source code.
StringValue VirtualRegister
void mapOptional(const char *Key, T &Val)
static StringRef input(StringRef Scalar, void *Ctx, StringValue &S)
bool operator==(const UnsignedValue &Other) const
static void mapping(IO &YamlIO, MachineConstantPoolValue &Constant)
Optional< std::vector< FlowStringValue > > CalleeSavedRegisters
EK_Inline - Jump table entries are emitted inline at their point of use.
FlowStringValue(std::string Value)
static void output(const UnsignedValue &Value, void *Ctx, raw_ostream &OS)
bool needsQuotes(StringRef S)
#define LLVM_YAML_IS_SEQUENCE_VECTOR(_type)
Utility for declaring that a std::vector of a particular type should be considered a YAML sequence...
static void enumeration(yaml::IO &IO, MachineStackObject::ObjectType &Type)
static void enumeration(yaml::IO &IO, FixedMachineStackObject::ObjectType &Type)
static bool mustQuote(StringRef Scalar)
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.
Reg
All possible values of the reg field in the ModR/M byte.
static void mapping(IO &YamlIO, MachineFunction &MF)
std::vector< VirtualRegisterDefinition > VirtualRegisters
This class should be specialized by any type that needs to be converted to/from a YAML mapping...
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 HasMustTailInVarArgFunc
EK_BlockAddress - Each entry is a plain address of block, e.g.
static bool mustQuote(StringRef Scalar)
static StringRef input(StringRef Scalar, void *Ctx, UnsignedValue &Value)
void enumCase(T &Val, const char *Str, const T ConstVal)
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
StringValue StackProtector
std::vector< MachineStackObject > StackObjects
Serializable representation of MachineFrameInfo.
LLVM_NODISCARD std::string str() const
str - Get the contents as an std::string.
StringValue(std::string Value)
static void mapping(yaml::IO &YamlIO, MachineStackObject &Object)
StringValue CalleeSavedRegister
static StringRef input(StringRef Scalar, void *Ctx, BlockStringValue &S)
This class should be specialized by any integral type that converts to/from a YAML scalar where there...
Optional< int64_t > LocalOffset
StringValue PreferredRegister
MachineFrameInfo FrameInfo
This class should be specialized by type that requires custom conversion to/from a yaml scalar...
bool operator==(const StringValue &Other) const
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...
SMRange getSourceRange() const
std::vector< MachineFunctionLiveIn > LiveIns
static void enumeration(yaml::IO &IO, MachineJumpTableInfo::JTEntryKind &EntryKind)
static StringRef input(StringRef Scalar, void *Ctx, FlowStringValue &S)
This class should be specialized by type that requires custom conversion to/from a YAML literal block...
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
std::vector< MachineConstantPoolValue > Constants
virtual bool outputting()=0
static bool mustQuote(StringRef Scalar)
#define LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR(_type)
Utility for declaring that a std::vector of a particular type should be considered a YAML flow sequen...
std::vector< FixedMachineStackObject > FixedStackObjects
LLVM Value Representation.
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)
void mapRequired(const char *Key, T &Val)
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)
static void output(const FlowStringValue &S, void *, llvm::raw_ostream &OS)
static void output(const StringValue &S, void *, llvm::raw_ostream &OS)
Abstract base class for all Nodes.