mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 16:17:38 +00:00
Use AllocationOrder in RegAllocGreedy, fix a bug in the hint calculation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121584 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -36,6 +36,10 @@ AllocationOrder::AllocationOrder(unsigned VirtReg,
|
||||
if (Hint && TargetRegisterInfo::isVirtualRegister(Hint))
|
||||
Hint = VRM.getPhys(Hint);
|
||||
|
||||
// The remaining allocation order may depend on the hint.
|
||||
tie(Begin, End) = VRM.getTargetRegInfo()
|
||||
.getAllocationOrder(RC, HintPair.first, Hint, VRM.getMachineFunction());
|
||||
|
||||
// Target-dependent hints require resolution.
|
||||
if (HintPair.first)
|
||||
Hint = VRM.getTargetRegInfo().ResolveRegAllocHint(HintPair.first, Hint,
|
||||
@@ -45,10 +49,6 @@ AllocationOrder::AllocationOrder(unsigned VirtReg,
|
||||
if (Hint && (!TargetRegisterInfo::isPhysicalRegister(Hint) ||
|
||||
!RC->contains(Hint) || ReservedRegs.test(Hint)))
|
||||
Hint = 0;
|
||||
|
||||
// The remaining allocation order may also depend on the hint.
|
||||
tie(Begin, End) = VRM.getTargetRegInfo()
|
||||
.getAllocationOrder(RC, HintPair.first, Hint, VRM.getMachineFunction());
|
||||
}
|
||||
|
||||
unsigned AllocationOrder::next() {
|
||||
|
||||
Reference in New Issue
Block a user