public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: GCSE store motion
@ 2002-05-15  9:07 Roger Sayle
  2002-05-15  9:21 ` Daniel Berlin
  0 siblings, 1 reply; 54+ messages in thread
From: Roger Sayle @ 2002-05-15  9:07 UTC (permalink / raw)
  To: gcc
  Cc: Mark Mitchell, David S. Miller, Andreas Jaeger, Daniel Berlin,
	Richard Henderson


I'm more than happy to attempt to fix GCSE store motion, but my current
understanding is that its working perfectly!

PR opt/5200 was filed by Andreas Jaeger on the supporting evidence of
PR opt/5172 and postings by Dan Berlin to gcc-patches last year.

In the review of my patch to that attempted to fix PR/5172
http://gcc.gnu.org/ml/gcc-patches/2002-01/msg01142.html, it
became clear that it was glibc at fault and not the store motion
pass at all.

Hence the only remaining claims that store motion is broken are
the comments by Dan Berlin, but as far as I am aware there are
no known examples of failing test cases.  Dan also claimed that
store motion wasn't currently doing anything, but clearly PR/5172
showed that duplicate stores are being eliminated in real code.

To appease the paranoia of the pending GCC 3.1 release it was
decided to disable this optimization even without conclusive
evidence that anything was broken.  Unless a failing test in
the GCC test suite starts passing, I'm against disabling a
functional optimization on the CVS mainline.  Finding a failing
test case would also help the call for volunteers to fix it.

Roger
--
Roger Sayle,                         E-mail: roger@eyesopen.com
OpenEye Scientific Software,         WWW: http://www.eyesopen.com/
Suite 1107, 3600 Cerrillos Road,     Tel: (+1) 505-473-7385
Santa Fe, New Mexico, 87507.         Fax: (+1) 505-473-0833

^ permalink raw reply	[flat|nested] 54+ messages in thread
[parent not found: <20020516114838.949B6F28C9@nile.gnat.com.suse.lists.egcs>]
* Re: GCSE store motion
@ 2002-05-16  8:29 Robert Dewar
  0 siblings, 0 replies; 54+ messages in thread
From: Robert Dewar @ 2002-05-16  8:29 UTC (permalink / raw)
  To: dberlin, dewar; +Cc: aj, davem, gcc, mark, roger, rth

> Intel's compiler immediately discounts loops with calls in them.

Reasonable, though of course on the ia64 you typically want to do very
aggressive inlining to have a chance of extracting sufficient ILP.

^ permalink raw reply	[flat|nested] 54+ messages in thread
* Re: GCSE store motion
@ 2002-05-16  5:36 Robert Dewar
  0 siblings, 0 replies; 54+ messages in thread
From: Robert Dewar @ 2002-05-16  5:36 UTC (permalink / raw)
  To: dewar, toon; +Cc: dberlin, gcc, law, mark, roger

> (Of course, those programmers should have used the SAVE statement to
>  cause the value of the variable to be kept)

The SAVE statement was a late addition to Fortran, so it is unfamiliar
to many Fortran programmers. I wonder if compilers could manage to
detect some cases of obvious omission and generate warnings?

^ permalink raw reply	[flat|nested] 54+ messages in thread
* Re: GCSE store motion
@ 2002-05-16  5:30 Robert Dewar
  2002-05-16  7:59 ` Mark Mitchell
  2002-05-16  8:31 ` Daniel Berlin
  0 siblings, 2 replies; 54+ messages in thread
From: Robert Dewar @ 2002-05-16  5:30 UTC (permalink / raw)
  To: dberlin, dewar, mark, roger; +Cc: aj, davem, gcc, rth

> That means we shouldn't be spending much time trying to do software
> loop pipelining when compiling GCC, so the optimization shouldn't
> make compiling the compiler significantly slower.

I don't see how you conclude this. You have to do the analysis on every
loop. There will definitely be loops in GCC where the optimization is
possible, there will be loops where it is not. I would expect the
compiler to spend quite a bit of time trying to improve code for
loops in GCC. What I am saying is that I doubt that the overall
effect will be that benficial for GCC.

^ permalink raw reply	[flat|nested] 54+ messages in thread
* Re: GCSE store motion
@ 2002-05-15 13:56 Robert Dewar
  2002-05-15 14:06 ` Gabriel Dos Reis
                   ` (2 more replies)
  0 siblings, 3 replies; 54+ messages in thread
From: Robert Dewar @ 2002-05-15 13:56 UTC (permalink / raw)
  To: mark, toon; +Cc: dberlin, gcc, law, roger

<No, but it'll help any and all Fortran programs that have to be compiled
with -fno-automatic because they were developed on systems where local
variables in subroutines kept their values from call to call.

Given the number of times my advice on comp.lang.fortran of compiling
with -fno-automatic actually `stopped the bug', I'd think that's rather
important ...
>

Interesting, considering that *every* version of the Fortran standard has
emphasized that there is no requirement for local variables in subroutines
to keep their values from call to call (the only exception is initialized
data that is never reassigned).

^ permalink raw reply	[flat|nested] 54+ messages in thread
* Re: GCSE store motion
@ 2002-05-15 12:45 Robert Dewar
  2002-05-15 12:56 ` Mark Mitchell
  2002-05-15 13:29 ` Daniel Berlin
  0 siblings, 2 replies; 54+ messages in thread
From: Robert Dewar @ 2002-05-15 12:45 UTC (permalink / raw)
  To: dberlin, mark, roger; +Cc: aj, davem, gcc, rth

<  If the optimization makes the compiler go slower when compiling itself,
  it ain't worth having.
>

I think that's much too harsh. For example a thorough job of software loop
pipelining using the rotating registers of the ia64 may require *quite*
a bit of compilation time, and since this optimization is unlikely to help
GCC itself much that seems unfortunate.

Perhaps a more appropriate rule is that this is the criterion for putting
an optimization in -O1.

^ permalink raw reply	[flat|nested] 54+ messages in thread
* GCSE store motion
@ 2002-05-14 23:27 David S. Miller
  2002-05-14 23:33 ` Daniel Berlin
  2002-05-15  1:22 ` Mark Mitchell
  0 siblings, 2 replies; 54+ messages in thread
From: David S. Miller @ 2002-05-14 23:27 UTC (permalink / raw)
  To: gcc; +Cc: mark


While walking over diffs between 3.1 and the mainline I came across
PR/5200.  Basically the fix on the branch just disabled store-motion
in GCSE.

This is one of those "fix it properly on the mainline" cases.

So who is going to step up and work on fixing store motion?
Aparently Dan Berlin and Jakub have some idea of the problems.
Refer to the GNATS PR for more information.

^ permalink raw reply	[flat|nested] 54+ messages in thread

end of thread, other threads:[~2002-05-17 21:26 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-15  9:07 GCSE store motion Roger Sayle
2002-05-15  9:21 ` Daniel Berlin
2002-05-15  9:53   ` Daniel Berlin
2002-05-15 10:05     ` Roger Sayle
2002-05-15 10:09       ` Daniel Berlin
2002-05-15 10:21         ` Jakub Jelinek
2002-05-15 10:31           ` Mark Mitchell
2002-05-15 11:56         ` law
2002-05-15 11:05     ` Kevin Handy
2002-05-15 11:50       ` Janis Johnson
2002-05-15 11:54     ` law
2002-05-15  9:58   ` Roger Sayle
2002-05-15 10:06     ` Daniel Berlin
2002-05-15 10:15       ` David Edelsohn
2002-05-15 11:56         ` law
2002-05-15 12:07           ` Mark Mitchell
2002-05-15 10:18       ` Roger Sayle
2002-05-15 10:32         ` David Edelsohn
2002-05-16  1:51       ` Jan Hubicka
2002-05-16  9:59         ` Daniel Berlin
2002-05-15 10:02   ` Mark Mitchell
2002-05-15 10:08     ` Roger Sayle
2002-05-15 10:14       ` Mark Mitchell
2002-05-15 10:41         ` Roger Sayle
2002-05-15 11:56         ` law
2002-05-15 12:07           ` Mark Mitchell
2002-05-15 13:48             ` Toon Moene
2002-05-16 13:50               ` law
2002-05-17 15:03               ` Tim Hollebeek
2002-05-16 13:53             ` law
2002-05-16 14:44               ` Daniel Berlin
2002-05-16 21:12                 ` Eric Christopher
2002-05-15 12:32   ` law
     [not found] <20020516114838.949B6F28C9@nile.gnat.com.suse.lists.egcs>
     [not found] ` <164620000.1021559673@gandalf.codesourcery.com.suse.lists.egcs>
2002-05-16 11:42   ` Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2002-05-16  8:29 Robert Dewar
2002-05-16  5:36 Robert Dewar
2002-05-16  5:30 Robert Dewar
2002-05-16  7:59 ` Mark Mitchell
2002-05-16  8:31 ` Daniel Berlin
2002-05-15 13:56 Robert Dewar
2002-05-15 14:06 ` Gabriel Dos Reis
2002-05-15 15:09 ` Toon Moene
2002-05-15 15:20 ` Dale Johannesen
2002-05-15 12:45 Robert Dewar
2002-05-15 12:56 ` Mark Mitchell
2002-05-15 13:29 ` Daniel Berlin
2002-05-14 23:27 David S. Miller
2002-05-14 23:33 ` Daniel Berlin
2002-05-15  0:03   ` David S. Miller
2002-05-15  0:41     ` Daniel Berlin
2002-05-15  1:27     ` Jan Hubicka
2002-05-15  1:22 ` Mark Mitchell
2002-05-15  1:29   ` David S. Miller
2002-05-15  1:32     ` Mark Mitchell

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).