summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MIRParser
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2015-07-14 00:26:26 +0000
committerAlex Lorenz <arphaman@gmail.com>2015-07-14 00:26:26 +0000
commit418f3ec17db24bcfc5737131dde5de556111bc32 (patch)
treeb30aba74e0f7a6b6c963633a8cea4948829e9756 /llvm/lib/CodeGen/MIRParser
parentce18a187f71a67125395181e821340b27d8fbdd9 (diff)
downloadbcm5719-llvm-418f3ec17db24bcfc5737131dde5de556111bc32.tar.gz
bcm5719-llvm-418f3ec17db24bcfc5737131dde5de556111bc32.zip
MIR Serialization: Serialize the variable sized stack objects.
llvm-svn: 242095
Diffstat (limited to 'llvm/lib/CodeGen/MIRParser')
-rw-r--r--llvm/lib/CodeGen/MIRParser/MIRParser.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
index ab4a037aba2..bfec6c59164 100644
--- a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
+++ b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp
@@ -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.
OpenPOWER on IntegriCloud