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
This commit is contained in:
Matt Arsenault
2017-07-20 21:03:45 +00:00
parent eac8e7c08a
commit db78273b6e
20 changed files with 271 additions and 77 deletions

View File

@@ -609,8 +609,9 @@ MachinePointerInfo MachinePointerInfo::getGOT(MachineFunction &MF) {
}
MachinePointerInfo MachinePointerInfo::getStack(MachineFunction &MF,
int64_t Offset) {
return MachinePointerInfo(MF.getPSVManager().getStack(), Offset);
int64_t Offset,
uint8_t ID) {
return MachinePointerInfo(MF.getPSVManager().getStack(), Offset,ID);
}
MachineMemOperand::MachineMemOperand(MachinePointerInfo ptrinfo, Flags f,