mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Emit COPY instructions instead of using copyRegToReg in InstrEmitter,
ScheduleDAGEmit, TwoAddressLowering, and PHIElimination. This switches the bulk of register copies to using COPY, but many less used copyRegToReg calls remain. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108050 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -50,11 +50,8 @@ void ScheduleDAG::EmitPhysRegCopy(SUnit *SU,
|
||||
break;
|
||||
}
|
||||
}
|
||||
bool Success = TII->copyRegToReg(*BB, InsertPos, Reg, VRI->second,
|
||||
SU->CopyDstRC, SU->CopySrcRC,
|
||||
DebugLoc());
|
||||
(void)Success;
|
||||
assert(Success && "copyRegToReg failed!");
|
||||
BuildMI(*BB, InsertPos, DebugLoc(), TII->get(TargetOpcode::COPY), Reg)
|
||||
.addReg(VRI->second);
|
||||
} else {
|
||||
// Copy from physical register.
|
||||
assert(I->getReg() && "Unknown physical register!");
|
||||
@ -62,11 +59,8 @@ void ScheduleDAG::EmitPhysRegCopy(SUnit *SU,
|
||||
bool isNew = VRBaseMap.insert(std::make_pair(SU, VRBase)).second;
|
||||
isNew = isNew; // Silence compiler warning.
|
||||
assert(isNew && "Node emitted out of order - early");
|
||||
bool Success = TII->copyRegToReg(*BB, InsertPos, VRBase, I->getReg(),
|
||||
SU->CopyDstRC, SU->CopySrcRC,
|
||||
DebugLoc());
|
||||
(void)Success;
|
||||
assert(Success && "copyRegToReg failed!");
|
||||
BuildMI(*BB, InsertPos, DebugLoc(), TII->get(TargetOpcode::COPY), VRBase)
|
||||
.addReg(I->getReg());
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user