mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 23:31:37 +00:00
Anti-dependency breaking needs to be careful not to use reserved regs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112832 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b1fcfbe89b
commit
9b041c92ef
@ -654,6 +654,8 @@ bool AggressiveAntiDepBreaker::FindSuitableFreeRegisters(
|
||||
if (R == RB) R = RE;
|
||||
--R;
|
||||
const unsigned NewSuperReg = *R;
|
||||
// Don't consider non-allocatable registers
|
||||
if (!AllocatableSet.test(NewSuperReg)) continue;
|
||||
// Don't replace a register with itself.
|
||||
if (NewSuperReg == SuperReg) continue;
|
||||
|
||||
|
@ -330,6 +330,8 @@ CriticalAntiDepBreaker::findSuitableFreeRegister(MachineInstr *MI,
|
||||
for (TargetRegisterClass::iterator R = RC->allocation_order_begin(MF),
|
||||
RE = RC->allocation_order_end(MF); R != RE; ++R) {
|
||||
unsigned NewReg = *R;
|
||||
// Don't consider non-allocatable registers
|
||||
if (!AllocatableSet.test(NewReg)) continue;
|
||||
// Don't replace a register with itself.
|
||||
if (NewReg == AntiDepReg) continue;
|
||||
// Don't replace a register with one that was recently used to repair
|
||||
|
Loading…
x
Reference in New Issue
Block a user