mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-13 04:24:40 +00:00
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:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user