mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-03 13:31:05 +00:00
Undo tweak. It had no obvious benefit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48341 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a13341737d
commit
c438f35df9
@ -687,22 +687,7 @@ void RALinScan::assignRegOrStackSlotAtInterval(LiveInterval* cur)
|
|||||||
|
|
||||||
// All registers must have inf weight. Just grab one!
|
// All registers must have inf weight. Just grab one!
|
||||||
if (!minReg) {
|
if (!minReg) {
|
||||||
if (BestPhysReg)
|
minReg = BestPhysReg ? BestPhysReg : *RC->allocation_order_begin(*mf_);
|
||||||
minReg = BestPhysReg;
|
|
||||||
else {
|
|
||||||
// Get the physical register with the fewest conflicts.
|
|
||||||
unsigned MinConflicts = ~0U;
|
|
||||||
for (TargetRegisterClass::iterator i = RC->allocation_order_begin(*mf_),
|
|
||||||
e = RC->allocation_order_end(*mf_); i != e; ++i) {
|
|
||||||
unsigned reg = *i;
|
|
||||||
unsigned NumConflicts = li_->getNumConflictsWithPhysReg(*cur, reg);
|
|
||||||
if (NumConflicts <= MinConflicts) {
|
|
||||||
MinConflicts = NumConflicts;
|
|
||||||
minReg = reg;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cur->weight == HUGE_VALF || cur->getSize() == 1)
|
if (cur->weight == HUGE_VALF || cur->getSize() == 1)
|
||||||
// Spill a physical register around defs and uses.
|
// Spill a physical register around defs and uses.
|
||||||
li_->spillPhysRegAroundRegDefsUses(*cur, minReg, *vrm_);
|
li_->spillPhysRegAroundRegDefsUses(*cur, minReg, *vrm_);
|
||||||
|
Loading…
Reference in New Issue
Block a user