mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-28 23:17:10 +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:
@@ -29,12 +29,13 @@ using namespace llvm;
|
||||
// Compare VirtRegMap::getRegAllocPref().
|
||||
AllocationOrder::AllocationOrder(unsigned VirtReg,
|
||||
const VirtRegMap &VRM,
|
||||
const RegisterClassInfo &RegClassInfo)
|
||||
const RegisterClassInfo &RegClassInfo,
|
||||
const LiveRegMatrix *Matrix)
|
||||
: Pos(0) {
|
||||
const MachineFunction &MF = VRM.getMachineFunction();
|
||||
const TargetRegisterInfo *TRI = &VRM.getTargetRegInfo();
|
||||
Order = RegClassInfo.getOrder(MF.getRegInfo().getRegClass(VirtReg));
|
||||
TRI->getRegAllocationHints(VirtReg, Order, Hints, MF, &VRM);
|
||||
TRI->getRegAllocationHints(VirtReg, Order, Hints, MF, &VRM, Matrix);
|
||||
rewind();
|
||||
|
||||
DEBUG({
|
||||
|
Reference in New Issue
Block a user