MIR Serialization: Serialize the machine function's liveins.

Reviewers: Duncan P. N. Exon Smith


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243288 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alex Lorenz
2015-07-27 17:42:45 +00:00
parent b7abbca1dd
commit a5da4f1f8d
8 changed files with 165 additions and 1 deletions

View File

@ -402,6 +402,21 @@ bool MIRParserImpl::initializeRegisterInfo(MachineFunction &MF,
RegInfo.setSimpleHint(Reg, PreferredReg);
}
}
// Parse the liveins.
for (const auto &LiveIn : YamlMF.LiveIns) {
unsigned Reg = 0;
if (parseNamedRegisterReference(Reg, SM, MF, LiveIn.Register.Value, PFS,
IRSlots, Error))
return error(Error, LiveIn.Register.SourceRange);
unsigned VReg = 0;
if (!LiveIn.VirtualRegister.Value.empty()) {
if (parseVirtualRegisterReference(
VReg, SM, MF, LiveIn.VirtualRegister.Value, PFS, IRSlots, Error))
return error(Error, LiveIn.VirtualRegister.SourceRange);
}
RegInfo.addLiveIn(Reg, VReg);
}
return false;
}