mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 00:24:26 +00:00
MIR Serialization: Serialize the variable sized stack objects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242095 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -391,9 +391,14 @@ bool MIRParserImpl::initializeFrameInfo(MachineFrameInfo &MFI,
|
||||
|
||||
// Initialize the ordinary frame objects.
|
||||
for (const auto &Object : YamlMF.StackObjects) {
|
||||
int ObjectIdx = MFI.CreateStackObject(
|
||||
Object.Size, Object.Alignment,
|
||||
Object.Type == yaml::MachineStackObject::SpillSlot);
|
||||
int ObjectIdx;
|
||||
if (Object.Type == yaml::MachineStackObject::VariableSized)
|
||||
ObjectIdx =
|
||||
MFI.CreateVariableSizedObject(Object.Alignment, /*Alloca=*/nullptr);
|
||||
else
|
||||
ObjectIdx = MFI.CreateStackObject(
|
||||
Object.Size, Object.Alignment,
|
||||
Object.Type == yaml::MachineStackObject::SpillSlot);
|
||||
MFI.setObjectOffset(ObjectIdx, Object.Offset);
|
||||
// TODO: Store the mapping between object IDs and object indices to parse
|
||||
// stack object references correctly.
|
||||
|
Reference in New Issue
Block a user