public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Nigel Stephens <nigel@mips.com>
To: richard@codesourcery.com
Cc: "Fu, Chao-Ying" <fu@mips.com>,
	 gcc@gcc.gnu.org,   "Thekkath, Radhika" <radhika@mips.com>
Subject: Re: [MIPS] MADD issue
Date: Fri, 13 Apr 2007 16:19:00 -0000	[thread overview]
Message-ID: <461F9F90.3060609@mips.com> (raw)
In-Reply-To: <87irc0pb0b.fsf@firetop.home>



Richard Sandiford wrote:
> Nigel Stephens <nigel@mips.com> writes:
>   
>> While I agree with you philosophically, it feels like (b) might be quite 
>> a major task. A number of optimisation passes which currently recognise 
>> and MUL and PLUS separately (e.g. loop strength reduction) would now 
>> need to be extended to handle the fused MULPLUS and MULSUB operators.
>>
>> And although the reduction in instruction count due to your previous 
>> change is good, what is it as a percentage of the total? After all it 
>> only helps code which uses 64-bit integer types with a 32-bit ABI, which 
>> is probably quite a small proportion of most real-life applications -- 
>> whereas for some algorithms the ability to use MADD is absolutely 
>> critical to performance, and for them losing the ability to generate 
>> MADD is a significant backward step for the compiler.
>>
>> How about, as a workaround until (b) sees the light of day, we 
>> reimplement adddi3 and subdi3 only (not the other di mode patterns), 
>> qualified by ISA_HAS_MADD_MSUB. Perhaps they could also be implemented 
>> more cleanly nowadays, using  define_insn_and_split and/or a "#" 
>> template, to avoid generating multi-instruction assembler sequences.
>>     
>
> The old patterns had a define_split too.  That wasn't really the problem.
>
> If you don't want to add a tree code yet, it would still be possible to
> add the optab and expand support, recognising mult-add sequences in a
> similar way to how we recognise widening multiplies now.  I feel at
> least that's a step in the right direction.
>   

OK, we'll have a think about that.

Thanks

Nigel

  reply	other threads:[~2007-04-13 15:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-13  0:26 Fu, Chao-Ying
2007-04-13 13:07 ` Paolo Bonzini
2007-04-13 17:05   ` Ian Lance Taylor
2007-04-13 18:10     ` Paolo Bonzini
2007-04-13 18:33       ` Richard Sandiford
2007-04-13 14:25 ` Richard Sandiford
2007-04-13 15:23   ` Nigel Stephens
2007-04-13 15:34     ` Richard Sandiford
2007-04-13 16:19       ` Nigel Stephens [this message]
2007-04-20 14:32       ` Nigel Stephens
2007-04-20 14:44         ` Richard Sandiford
2007-04-20 15:05           ` Nigel Stephens
2007-04-20 16:38             ` Richard Sandiford
2007-04-21  0:53               ` Fu, Chao-Ying
2007-04-20 16:46           ` Ian Lance Taylor
2007-04-20 16:57             ` Richard Sandiford
2007-04-20 17:00               ` Ian Lance Taylor
2007-04-20 17:06                 ` Richard Sandiford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=461F9F90.3060609@mips.com \
    --to=nigel@mips.com \
    --cc=fu@mips.com \
    --cc=gcc@gcc.gnu.org \
    --cc=radhika@mips.com \
    --cc=richard@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).