llvm-project/llvm/test/CodeGen/SPARC
Andrew Trick 8485257d6d Allocate local registers in order for optimal coloring.
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.

llvm-svn: 187139
2013-07-25 18:35:14 +00:00
..
64abi.ll Sparc: Perform leaf procedure optimization by default 2013-06-02 02:24:27 +00:00
64bit.ll Mass update to CodeGen tests to use CHECK-LABEL for labels corresponding to function definitions for more informative error messages. No functionality change and all updated tests passed locally. 2013-07-14 06:24:09 +00:00
64cond.ll Allocate local registers in order for optimal coloring. 2013-07-25 18:35:14 +00:00
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-CC.ll Update to more CodeGen tests to use CHECK-LABEL for labels corresponding to function definitions for more informative error messages. No functionality change. 2013-07-18 22:47:09 +00:00
2011-01-11-Call.ll
2011-01-11-FrameAddr.ll Update to more CodeGen tests to use CHECK-LABEL for labels corresponding to function definitions for more informative error messages. No functionality change. 2013-07-18 22:47:09 +00:00
2011-01-19-DelaySlot.ll Update to more CodeGen tests to use CHECK-LABEL for labels corresponding to function definitions for more informative error messages. No functionality change. 2013-07-18 22:47:09 +00:00
2011-01-21-ByValArgs.ll Update to more CodeGen tests to use CHECK-LABEL for labels corresponding to function definitions for more informative error messages. No functionality change. 2013-07-18 22:47:09 +00:00
2011-01-22-SRet.ll Update to more CodeGen tests to use CHECK-LABEL for labels corresponding to function definitions for more informative error messages. No functionality change. 2013-07-18 22:47:09 +00:00
2011-12-03-TailDuplication.ll
2012-05-01-LowerArguments.ll Regression test for PR2960. 2012-05-01 11:11:34 +00:00
2013-05-17-CallFrame.ll [Sparc] Implements hasReservedCallFrame and hasFP. 2013-05-17 15:14:34 +00:00
DbgValueOtherTargets.test Remove unnecessary leading comment characters in lit-only file 2013-03-18 22:08:16 +00:00
basictest.ll Mass update to CodeGen tests to use CHECK-LABEL for labels corresponding to function definitions for more informative error messages. No functionality change and all updated tests passed locally. 2013-07-14 06:24:09 +00:00
blockaddr.ll Mass update to CodeGen tests to use CHECK-LABEL for labels corresponding to function definitions for more informative error messages. No functionality change and all updated tests passed locally. 2013-07-14 06:24:09 +00:00
constpool.ll Sparc: Perform leaf procedure optimization by default 2013-06-02 02:24:27 +00:00
ctpop.ll Add support for 64-bit calling convention. 2013-04-02 04:09:02 +00:00
float.ll Mass update to CodeGen tests to use CHECK-LABEL for labels corresponding to function definitions for more informative error messages. No functionality change and all updated tests passed locally. 2013-07-14 06:24:09 +00:00
globals.ll Sparc: Perform leaf procedure optimization by default 2013-06-02 02:24:27 +00:00
leafproc.ll Mass update to CodeGen tests to use CHECK-LABEL for labels corresponding to function definitions for more informative error messages. No functionality change and all updated tests passed locally. 2013-07-14 06:24:09 +00:00
lit.local.cfg Include '.test' suffix in target specific lit configs that need it 2013-03-18 20:31:44 +00:00
mult-alt-generic-sparc.ll
private.ll test/CodeGen/SPARC/private.ll: Fixup. Forgot to prune old RUN lines. 2012-07-03 04:29:20 +00:00
varargs.ll Sparc: Mark functions calling llvm.vastart and llvm.returnaddress intrinsics as non-leaf functions. 2013-06-01 20:42:48 +00:00