[PATCH 2/2] R600/SI: Remove explicit m0 operand from s_sendmsg

Tom Stellard tom at stellard.net
Thu Apr 23 16:58:08 PDT 2015


On Tue, Apr 14, 2015 at 10:49:21AM -0700, Matt Arsenault wrote:
> On 04/14/2015 09:32 AM, Tom Stellard wrote:
> > Instead add m0 as an implicit operand.  This allows us to avoid using
> > the M0Reg register class and eliminates a number of unnecessary spills
> > when using s_sendmsg instructions.  This impacts one shader in the
> > shader-db:
> >
> > SGPRS: 48 -> 40 (-16.67 %)
> > VGPRS: 112 -> 108 (-3.57 %)
> > Code Size: 40132 -> 38796 (-3.33 %) bytes
> > LDS: 0 -> 0 (0.00 %) blocks
> > Scratch: 2048 -> 0 (-100.00 %) bytes per wave
> > ---
> >   lib/Target/R600/AMDGPUISelLowering.cpp |  1 +
> >   lib/Target/R600/AMDGPUISelLowering.h   |  1 +
> >   lib/Target/R600/AMDGPUInstrInfo.td     |  4 ++++
> >   lib/Target/R600/SIISelLowering.cpp     | 12 +++++++++++-
> >   lib/Target/R600/SIInstructions.td      | 12 +++++-------
> >   5 files changed, 22 insertions(+), 8 deletions(-)
> >
> >
> 
> LGTM


Hi Matt,

I found a problem with this patch working on something else.  The change
in this new version is that copyToM0() now emits a Copy and an s_mov_b32
in order to ensure that the value copied to M0 gets CSE'd.

-Tom

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-R600-SI-Remove-explicit-m0-operand-from-s_sendmsg.patch
Type: text/x-diff
Size: 6509 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150423/7a27e3ef/attachment.patch>


More information about the llvm-commits mailing list