This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] optabs.c: Optimize C .op. R - revoke.
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 10 Jul 2002 21:26:47 +0200
- Subject: Re: [Patch] optabs.c: Optimize C .op. R - revoke.
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <3D2746A5.5381B24@moene.indiv.nluug.nl> <20020710105625.A12100@redhat.com>
Richard Henderson wrote:
> On Sat, Jul 06, 2002 at 09:36:05PM +0200, Toon Moene wrote:
> > "If Richard says it's OK to jump off a cliff, would you do it too ?"
>
> Not a chance. I don't trust that guy as far as I can throw him.
:-)
> > The only optimization it doesn't do is to convert C / R to two
> > divisions.
>
> So isn't it valuable at least in that case? Plus, I don't think
> it's a waste of time not generating rtl for cse to maybe clean up.
> Especially with as little effort as these patches used.
Sorry, this is probably a confusion on your side due to my poor command
of the English language. What I meant to say was that my changes to
optabs.c don't do anything. All the observed changes are due to cse.c.
>From my experimenting it is now obvious that even as the SCmode CONCAT
is created, the real and imaginary parts are already REGs (so even the
SYMBOL_REF that was there previously to point to the 0.0 in the constant
pool is already not directly accessible anymore). This means that no
"in place change" can do this optimization and we *must* use a real
optimization "pass", e.g., CSE.
It is unfortunate that CSE (nor any other pass) knows how to deal with:
if (abs(a) >= 0) then
...
else
...
endif
but that's just how it is, today.
> If you're still convinced these should be reverted, go ahead.
I will, thanks for looking at this.
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)