[PATCH] PR18825 - New RegisterCoalescer subtarget hook

Chris Bieneman cbieneman at apple.com
Fri Jul 11 13:44:45 PDT 2014


The attached patch adds a new subtarget hook to the RegisterCoalescer, and an ARM implementation. The ARM implementation works around PR18825, and also better code in cases with a large number of NEON vectors in use.

The basic problem is that the coalescer is very aggressive at propagating constraints on the register classes, and the register allocator doesn’t know how to split sub-registers later to recover. This patch provides an escape valve for targets that encounter this problem to limit coalescing.

A few other notes about this patch:

(1) In code that triggers the heuristic (using a lot of large vector registers) this code can improve compile time substantially, and in other code it has no adverse impact.

(2) This code also breaks one of the tests in our test suite (CodeGen/ARM/vldm-sched-a9.ll). This test is designed to test NEON vector spilling, and with this patch the test no longer spills. With the final patch I will provide a new test case to test vector spilling, and this test will be marked XFAIL so that we don’t regress this and start spilling here again.

Thanks,
-Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 18825.diff
Type: application/octet-stream
Size: 6173 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140711/12739667/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2014-07-11-out-of-registers.ll
Type: application/octet-stream
Size: 2173 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140711/12739667/attachment-0001.obj>


More information about the llvm-commits mailing list