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())
110 if (
const auto *
Node =
111 reinterpret_cast<yaml::Input *>(Ctx)->getCurrentNode())
124 IO.
enumCase(EntryKind,
"block-address",
126 IO.
enumCase(EntryKind,
"gp-rel64-block-address",
128 IO.
enumCase(EntryKind,
"gp-rel32-block-address",
130 IO.
enumCase(EntryKind,
"label-difference32",
166 static const bool flow =
true;
186 static const bool flow =
true;
204 unsigned Alignment = 0;
222 IO.
enumCase(Type,
"default", MachineStackObject::DefaultType);
223 IO.
enumCase(Type,
"spill-slot", MachineStackObject::SpillSlot);
224 IO.
enumCase(Type,
"variable-sized", MachineStackObject::VariableSized);
235 MachineStackObject::DefaultType);
237 if (Object.
Type != MachineStackObject::VariableSized)
251 static const bool flow =
true;
262 unsigned Alignment = 0;
263 bool IsImmutable =
false;
264 bool IsAliased =
false;
278 IO.
enumCase(Type,
"default", FixedMachineStackObject::DefaultType);
279 IO.
enumCase(Type,
"spill-slot", FixedMachineStackObject::SpillSlot);
288 FixedMachineStackObject::DefaultType);
292 if (Object.
Type != FixedMachineStackObject::SpillSlot) {
300 static const bool flow =
true;
306 unsigned Alignment = 0;
326 return ID == Other.
ID && Blocks == Other.
Blocks;
361 std::vector<MachineJumpTable::Entry>());
373 bool IsFrameAddressTaken =
false;
374 bool IsReturnAddressTaken =
false;
375 bool HasStackMap =
false;
376 bool HasPatchPoint =
false;
377 uint64_t StackSize = 0;
378 int OffsetAdjustment = 0;
379 unsigned MaxAlignment = 0;
380 bool AdjustsStack =
false;
381 bool HasCalls =
false;
384 unsigned MaxCallFrameSize = ~0u;
385 bool HasOpaqueSPAdjustment =
false;
386 bool HasVAStart =
false;
387 bool HasMustTailInVarArgFunc =
false;
436 unsigned Alignment = 0;
437 bool ExposesReturnsTwice =
false;
439 bool Legalized =
false;
440 bool RegBankSelected =
false;
441 bool Selected =
false;
443 bool TracksRegLiveness =
false;
467 std::vector<VirtualRegisterDefinition>());
469 std::vector<MachineFunctionLiveIn>());
471 Optional<std::vector<FlowStringValue>>());
474 std::vector<FixedMachineStackObject>());
476 std::vector<MachineStackObject>());
478 std::vector<MachineConstantPoolValue>());
Represents a range in source code.
StringValue VirtualRegister
void mapOptional(const char *Key, T &Val)
bool operator==(const BlockStringValue &Other) const
static StringRef input(StringRef Scalar, void *Ctx, StringValue &S)
bool operator==(const UnsignedValue &Other) const
static void mapping(IO &YamlIO, MachineConstantPoolValue &Constant)
bool operator==(const VirtualRegisterDefinition &Other) const
bool operator==(const MachineFrameInfo &Other) const
Optional< std::vector< FlowStringValue > > CalleeSavedRegisters
bool operator==(const MachineStackObject &Other) const
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)
bool operator==(const MachineJumpTable &Other) const
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.
bool operator==(const Entry &Other) const
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.
bool operator==(const MachineConstantPoolValue &Other) const
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
~0u means: not computed yet.
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)
#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...
bool operator==(const FixedMachineStackObject &Other) const
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...
Promote Memory to Register
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...
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
SMRange getSourceRange() const
std::vector< MachineFunctionLiveIn > LiveIns
bool operator==(const MachineFunctionLiveIn &Other) const
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)
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.