mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
6ea2b9608a
Also avoid locals evicting locals just because they want a cheaper register. Problem: MI Sched knows exactly how many registers we have and assumes they can be colored. In cases where we have large blocks, usually from unrolled loops, greedy coloring fails. This is a source of "regressions" from the MI Scheduler on x86. I noticed this issue on x86 where we have long chains of two-address defs in the same live range. It's easy to see this in matrix multiplication benchmarks like IRSmk and even the unit test misched-matmul.ll. A fundamental difference between the LLVM register allocator and conventional graph coloring is that in our model a live range can't discover its neighbors, it can only verify its neighbors. That's why we initially went for greedy coloring and added eviction to deal with the hard cases. However, for singly defined and two-address live ranges, we can optimally color without visiting neighbors simply by processing the live ranges in instruction order. Other beneficial side effects: It is much easier to understand and debug regalloc for large blocks when the live ranges are allocated in order. Yes, global allocation is still very confusing, but it's nice to be able to comprehend what happened locally. Heuristics could be added to bias register assignment based on instruction locality (think late register pairing, banks...). Intuituvely this will make some test cases that are on the threshold of register pressure more stable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187139 91177308-0d34-0410-b5e6-96231b3b80d8 |
||
---|---|---|
.. | ||
64abi.ll | ||
64bit.ll | ||
64cond.ll | ||
2006-01-22-BitConvertLegalize.ll | ||
2007-05-09-JumpTables.ll | ||
2007-07-05-LiveIntervalAssert.ll | ||
2008-10-10-InlineAsmMemoryOperand.ll | ||
2008-10-10-InlineAsmRegOperand.ll | ||
2009-08-28-PIC.ll | ||
2009-08-28-WeakLinkage.ll | ||
2011-01-11-Call.ll | ||
2011-01-11-CC.ll | ||
2011-01-11-FrameAddr.ll | ||
2011-01-19-DelaySlot.ll | ||
2011-01-21-ByValArgs.ll | ||
2011-01-22-SRet.ll | ||
2011-12-03-TailDuplication.ll | ||
2012-05-01-LowerArguments.ll | ||
2013-05-17-CallFrame.ll | ||
basictest.ll | ||
blockaddr.ll | ||
constpool.ll | ||
ctpop.ll | ||
DbgValueOtherTargets.test | ||
float.ll | ||
globals.ll | ||
leafproc.ll | ||
lit.local.cfg | ||
mult-alt-generic-sparc.ll | ||
private.ll | ||
varargs.ll |