[llvm-commits] [PATCH 4/6] Eliminate redundant CR moves on PPC32

Tobias von Koch tobias.von.koch at gmail.com
Wed Aug 22 03:16:13 PDT 2012

Dear all,

This is part of a series of patches for the PowerPC backend to improve
support for Freescale processors.

Please review and commit if this is OK - I don't have commit access.


Description of this patch:

The 32-bit ABI requires CR bit 6 to be set if the call has fp arguments and
unset if it doesn't. The solution up to now was to insert a MachineNode to
set/unset the CR bit, which produces a CR vreg. This vreg was then copied
into CR bit 6. When the register allocator saw a bunch of these in the same
function, it allocated the set/unset CR bit in some random CR register (1
extra instruction) and then emitted CR moves before every vararg function
call, rather than just setting and unsetting CR bit 6 directly before every
vararg function call. This patch instead insert a PPCcrset/PPCcrunset
instruction which are then matched by a dedicated instruction pattern.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120822/6953e86e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ppc-crset-crunset.patch
Type: application/octet-stream
Size: 5298 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120822/6953e86e/attachment.obj>

More information about the llvm-commits mailing list