mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
MIR Serialization: Serialize the unnamed basic block references.
This commit serializes the references from the machine basic blocks to the unnamed basic blocks. This commit adds a new attribute to the machine basic block's YAML mapping called 'ir-block'. This attribute contains the actual reference to the basic block. Reviewers: Duncan P. N. Exon Smith git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243340 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -135,6 +135,7 @@ template <> struct MappingTraits<MachineFunctionLiveIn> {
|
||||
struct MachineBasicBlock {
|
||||
unsigned ID;
|
||||
StringValue Name;
|
||||
StringValue IRBlock;
|
||||
unsigned Alignment = 0;
|
||||
bool IsLandingPad = false;
|
||||
bool AddressTaken = false;
|
||||
@@ -149,6 +150,8 @@ template <> struct MappingTraits<MachineBasicBlock> {
|
||||
YamlIO.mapRequired("id", MBB.ID);
|
||||
YamlIO.mapOptional("name", MBB.Name,
|
||||
StringValue()); // Don't print out an empty name.
|
||||
YamlIO.mapOptional("ir-block", MBB.IRBlock,
|
||||
StringValue()); // Don't print out an empty BB reference.
|
||||
YamlIO.mapOptional("alignment", MBB.Alignment);
|
||||
YamlIO.mapOptional("isLandingPad", MBB.IsLandingPad);
|
||||
YamlIO.mapOptional("addressTaken", MBB.AddressTaken);
|
||||
|
Reference in New Issue
Block a user