mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-18 11:24:01 +00:00
Change the heuristics used in the coalescer, register allocator, and within
live intervals itself to use an instruction count approximation that is not affected by inserting empty indices. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53937 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -851,7 +851,8 @@ void RALinScan::assignRegOrStackSlotAtInterval(LiveInterval* cur)
|
||||
if (minWeight == HUGE_VALF) {
|
||||
// All registers must have inf weight. Just grab one!
|
||||
minReg = BestPhysReg ? BestPhysReg : *RC->allocation_order_begin(*mf_);
|
||||
if (cur->weight == HUGE_VALF || cur->getSize() == 1)
|
||||
if (cur->weight == HUGE_VALF ||
|
||||
li_->getApproximateInstructionCount(*cur) == 1)
|
||||
// Spill a physical register around defs and uses.
|
||||
li_->spillPhysRegAroundRegDefsUses(*cur, minReg, *vrm_);
|
||||
}
|
||||
|
Reference in New Issue
Block a user