diff options
author | Hal Finkel <hfinkel@anl.gov> | 2012-08-28 02:10:27 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2012-08-28 02:10:27 +0000 |
commit | 5ab378037f2fde6694ef926b26d3df7ea6b8334d (patch) | |
tree | 4371442d19d761286b37b66c6d8476c702cf7ce1 /llvm/lib/Support/Triple.cpp | |
parent | e39526a789754d8459eed63757cd6782dd2db834 (diff) | |
download | bcm5719-llvm-5ab378037f2fde6694ef926b26d3df7ea6b8334d.tar.gz bcm5719-llvm-5ab378037f2fde6694ef926b26d3df7ea6b8334d.zip |
Eliminate redundant CR moves on PPC32.
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 inserts a PPCcrset/PPCcrunset
instruction which are then matched by a dedicated instruction pattern.
Patch by Tobias von Koch.
llvm-svn: 162725
Diffstat (limited to 'llvm/lib/Support/Triple.cpp')
0 files changed, 0 insertions, 0 deletions