This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PowerPC multiply and -Os
- From: Dale Johannesen <dalej at apple dot com>
- To: David Edelsohn <dje at watson dot ibm dot com>
- Cc: Dale Johannesen <dalej at apple dot com>, Geoff Keating <geoffk at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 1 Aug 2002 17:43:55 -0700
- Subject: Re: PowerPC multiply and -Os
On Thursday, August 1, 2002, at 03:23 PM, David Edelsohn wrote:
PR optimization/7067 ultimately boils down to RTX_COSTS for MULT.
What do you think about RTX_COSTS returning an artificially small value
for optimize_size so that a single multiply is chosen over shift
instructions?
The same problem exists on other targets. There's probably no better way
to handle targets with variable-length instructions than to do it in the
target-dependent files. I wonder if a more generic solution is possible
for fixed-length targets. Is there a macro that makes it easy to tell?
Of course you want to choose a single shift over a multiply, but you knew
that.
(Funny, Apple is probably more concerned about code size than the next 5
companies
put together, but this case never showed up.)