diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-07-20 21:03:45 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-07-20 21:03:45 +0000 |
commit | db78273b6ea5cdce18c768fce5a1bdf55d61d91d (patch) | |
tree | d4669ed5cfc8ff241e204644a9380ab6c68ccdab /llvm/lib/CodeGen/MIRParser/MIRParser.cpp | |
parent | eac8e7c08abbe4c8adefcceb429bd073ef172622 (diff) | |
download | llvm-db78273b6ea5cdce18c768fce5a1bdf55d61d91d.zip llvm-db78273b6ea5cdce18c768fce5a1bdf55d61d91d.tar.gz llvm-db78273b6ea5cdce18c768fce5a1bdf55d61d91d.tar.bz2 |
Add an ID field to StackObjects
On AMDGPU SGPR spills are really spilled to another register.
The spiller creates the spills to new frame index objects,
which is used as a placeholder.
This will eventually be replaced with a reference to a position
in a VGPR to write to and the frame index deleted. It is
most likely not a real stack location that can be shared
with another stack object.
This is a problem when StackSlotColoring decides it should
combine a frame index used for a normal VGPR spill with
a real stack location and a frame index used for an SGPR.
Add an ID field so that StackSlotColoring has a way
of knowing the different frame index types are
incompatible.
llvm-svn: 308673
Diffstat (limited to 'llvm/lib/CodeGen/MIRParser/MIRParser.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MIRParser/MIRParser.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp index 78b57f3..d0b46c4 100644 --- a/llvm/lib/CodeGen/MIRParser/MIRParser.cpp +++ b/llvm/lib/CodeGen/MIRParser/MIRParser.cpp @@ -587,6 +587,7 @@ bool MIRParserImpl::initializeFrameInfo(PerFunctionMIParsingState &PFS, else ObjectIdx = MFI.CreateFixedSpillStackObject(Object.Size, Object.Offset); MFI.setObjectAlignment(ObjectIdx, Object.Alignment); + MFI.setStackID(ObjectIdx, Object.StackID); if (!PFS.FixedStackObjectSlots.insert(std::make_pair(Object.ID.Value, ObjectIdx)) .second) @@ -619,6 +620,8 @@ bool MIRParserImpl::initializeFrameInfo(PerFunctionMIParsingState &PFS, Object.Size, Object.Alignment, Object.Type == yaml::MachineStackObject::SpillSlot, Alloca); MFI.setObjectOffset(ObjectIdx, Object.Offset); + MFI.setStackID(ObjectIdx, Object.StackID); + if (!PFS.StackObjectSlots.insert(std::make_pair(Object.ID.Value, ObjectIdx)) .second) return error(Object.ID.SourceRange.Start, |