mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
[SystemZ] Enable the use of MVC for frame-to-frame spills
...now that the problem that prompted the restriction has been fixed. The original spill-02.py was a compromise because at the time I couldn't find an example that actually failed without the two scavenging slots. The version included here did. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185701 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -363,18 +363,11 @@ SystemZInstrInfo::foldMemoryOperandImpl(MachineFunction &MF,
|
||||
// not valid in cases where the two memories partially overlap; however,
|
||||
// that is not a problem here, because we know that one of the memories
|
||||
// is a full frame index.
|
||||
//
|
||||
// For now we punt if the load or store is also to a frame index.
|
||||
// In that case we might end up eliminating both of them to out-of-range
|
||||
// offsets, which might then force the register scavenger to spill two
|
||||
// other registers. The backend can only handle one such scavenger spill
|
||||
// at a time.
|
||||
if (OpNum == 0 && MI->hasOneMemOperand()) {
|
||||
MachineMemOperand *MMO = *MI->memoperands_begin();
|
||||
if (MMO->getSize() == Size && !MMO->isVolatile()) {
|
||||
// Handle conversion of loads.
|
||||
if (isSimpleBD12Move(MI, SystemZII::SimpleBDXLoad) &&
|
||||
!MI->getOperand(1).isFI()) {
|
||||
if (isSimpleBD12Move(MI, SystemZII::SimpleBDXLoad)) {
|
||||
uint64_t Offset = 0;
|
||||
MachineMemOperand *FrameMMO = getFrameMMO(MF, FrameIndex, Offset,
|
||||
MachineMemOperand::MOStore);
|
||||
@@ -384,8 +377,7 @@ SystemZInstrInfo::foldMemoryOperandImpl(MachineFunction &MF,
|
||||
.addMemOperand(FrameMMO).addMemOperand(MMO);
|
||||
}
|
||||
// Handle conversion of stores.
|
||||
if (isSimpleBD12Move(MI, SystemZII::SimpleBDXStore) &&
|
||||
!MI->getOperand(1).isFI()) {
|
||||
if (isSimpleBD12Move(MI, SystemZII::SimpleBDXStore)) {
|
||||
uint64_t Offset = 0;
|
||||
MachineMemOperand *FrameMMO = getFrameMMO(MF, FrameIndex, Offset,
|
||||
MachineMemOperand::MOLoad);
|
||||
|
Reference in New Issue
Block a user