[PATCH 2/3] [PBQP] Callee saved regs should have a higher cost than scratch regs
Arnaud A. de Grandmaison
arnaud.degrandmaison at arm.com
Wed Oct 22 06:38:21 PDT 2014
Hi Lang,
Could you please review this second patch in the PBQP improvement series ?
This patch teaches PBQP to handle callee saved registers: registers are not
all equal.
Some are not allocatable (infinite cost), some have to be preserved but can
be used,
and some others are just free to use.
Ensure there is a cost hierarchy reflecting this, so that the allocator will
favour scratch
registers over callee-saved registers. This does not model fully the reality
as the cost
for saving / restoring those CSR is paid only once, at their very first use,
and they then
become equivalent to scratch registers: with this patch, they will always
have a higher cost.
One way to improve this would be to handle that on a per allocation round
basis: if a CSR has
been used in one of the preceding rounds, then it becomes a scratch reg in
the sense that
it is as cheap to use as a scratch reg. This would be closer to reality.
What do you think ?
Cheers,
--
Arnaud A. de Grandmaison
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141022/0596ebf4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-PBQP-Callee-saved-regs-should-have-a-higher-cost-tha.patch
Type: application/octet-stream
Size: 6740 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141022/0596ebf4/attachment.obj>
More information about the llvm-commits
mailing list