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

Hal Finkel hfinkel at anl.gov
Mon Aug 27 19:52:41 PDT 2012


On Wed, 22 Aug 2012 11:16:13 +0100
Tobias von Koch <tobias.von.koch at gmail.com> wrote:

> 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.

r162725. Thanks!

 -Hal

> 
> Thanks!
> Tobias
> 
> 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.



-- 
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-commits mailing list