mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-28 06:24:57 +00:00
TargetRegisterInfo: Provide a way to check assigned registers in getRegAllocationHints()
Pass a const reference to LiveRegMatrix to getRegAllocationHints() because some targets can prodive better hints if they can test whether a physreg has been used for register allocation yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242340 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -637,7 +637,7 @@ unsigned RAGreedy::tryAssign(LiveInterval &VirtReg,
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
unsigned RAGreedy::canReassign(LiveInterval &VirtReg, unsigned PrevReg) {
|
||||
AllocationOrder Order(VirtReg.reg, *VRM, RegClassInfo);
|
||||
AllocationOrder Order(VirtReg.reg, *VRM, RegClassInfo, Matrix);
|
||||
unsigned PhysReg;
|
||||
while ((PhysReg = Order.next())) {
|
||||
if (PhysReg == PrevReg)
|
||||
@ -2450,7 +2450,7 @@ unsigned RAGreedy::selectOrSplitImpl(LiveInterval &VirtReg,
|
||||
unsigned Depth) {
|
||||
unsigned CostPerUseLimit = ~0u;
|
||||
// First try assigning a free register.
|
||||
AllocationOrder Order(VirtReg.reg, *VRM, RegClassInfo);
|
||||
AllocationOrder Order(VirtReg.reg, *VRM, RegClassInfo, Matrix);
|
||||
if (unsigned PhysReg = tryAssign(VirtReg, Order, NewVRegs)) {
|
||||
// When NewVRegs is not empty, we may have made decisions such as evicting
|
||||
// a virtual register, go with the earlier decisions and use the physical
|
||||
|
Reference in New Issue
Block a user