public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* -O3 and new optimizations in 4.4.0
@ 2009-04-23 17:09 David Ronis
  2009-04-23 17:25 ` Joseph S. Myers
  0 siblings, 1 reply; 14+ messages in thread
From: David Ronis @ 2009-04-23 17:09 UTC (permalink / raw)
  To: gcc

From the info pages it seems that the new optimizations,
-floop-interchange, -floop-strip-mine, and -floop-block, are NOT turned
on when -O3 is specified.  Is this correct and if so, why aren't they?

David

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

* Re: -O3 and new optimizations in 4.4.0
  2009-04-23 17:09 -O3 and new optimizations in 4.4.0 David Ronis
@ 2009-04-23 17:25 ` Joseph S. Myers
  2009-04-23 17:38   ` David Ronis
  2009-04-24 13:59   ` Sebastian Pop
  0 siblings, 2 replies; 14+ messages in thread
From: Joseph S. Myers @ 2009-04-23 17:25 UTC (permalink / raw)
  To: David Ronis; +Cc: gcc

On Thu, 23 Apr 2009, David Ronis wrote:

> >From the info pages it seems that the new optimizations,
> -floop-interchange, -floop-strip-mine, and -floop-block, are NOT turned
> on when -O3 is specified.  Is this correct and if so, why aren't they?

Because the behavior of -O3 must not depend on whether optional libraries 
are linked into GCC, and we did not decide to make PPL and CLooG required 
to build GCC, so -O3 cannot enable any optimizations using optional 
libraries.

-- 
Joseph S. Myers
joseph@codesourcery.com

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

* Re: -O3 and new optimizations in 4.4.0
  2009-04-23 17:25 ` Joseph S. Myers
@ 2009-04-23 17:38   ` David Ronis
  2009-04-23 17:46     ` Joseph S. Myers
  2009-04-24 13:59   ` Sebastian Pop
  1 sibling, 1 reply; 14+ messages in thread
From: David Ronis @ 2009-04-23 17:38 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc

Thanks for the reply.  On the other hand, it seems that PPL and Cloog
are auto-detected  by configure; shouldn't that be enough to dynamically
modify what -O3 does (or perhaps enable -O4)?   On a related point,
having used my old build script to build gcc I, of course, didn't read
the prerequisites section.  I have to rebuild right?

David 


On Thu, 2009-04-23 at 15:57 +0000, Joseph S. Myers wrote:
> On Thu, 23 Apr 2009, David Ronis wrote:
> 
> > >From the info pages it seems that the new optimizations,
> > -floop-interchange, -floop-strip-mine, and -floop-block, are NOT turned
> > on when -O3 is specified.  Is this correct and if so, why aren't they?
> 
> Because the behavior of -O3 must not depend on whether optional libraries 
> are linked into GCC, and we did not decide to make PPL and CLooG required 
> to build GCC, so -O3 cannot enable any optimizations using optional 
> libraries.
> 

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

* Re: -O3 and new optimizations in 4.4.0
  2009-04-23 17:38   ` David Ronis
@ 2009-04-23 17:46     ` Joseph S. Myers
  0 siblings, 0 replies; 14+ messages in thread
From: Joseph S. Myers @ 2009-04-23 17:46 UTC (permalink / raw)
  To: David Ronis; +Cc: gcc

On Thu, 23 Apr 2009, David Ronis wrote:

> Thanks for the reply.  On the other hand, it seems that PPL and Cloog
> are auto-detected  by configure; shouldn't that be enough to dynamically
> modify what -O3 does (or perhaps enable -O4)?   On a related point,
> having used my old build script to build gcc I, of course, didn't read
> the prerequisites section.  I have to rebuild right?

The whole point is that gcc -O3 should not depend on what was detected at 
configure time; everyone's gcc -O3 (with the same configure options) 
should behave the same way to avoid mysterious problems appearing only for 
some people (unreproducible bug reports, etc.) depending on what they had 
installed when GCC was built.

-- 
Joseph S. Myers
joseph@codesourcery.com

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

* Re: -O3 and new optimizations in 4.4.0
  2009-04-23 17:25 ` Joseph S. Myers
  2009-04-23 17:38   ` David Ronis
@ 2009-04-24 13:59   ` Sebastian Pop
  2009-04-24 14:05     ` Robert Dewar
  1 sibling, 1 reply; 14+ messages in thread
From: Sebastian Pop @ 2009-04-24 13:59 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: David Ronis, gcc, Harle, Christophe

Hi,

On Thu, Apr 23, 2009 at 10:57, Joseph S. Myers <joseph@codesourcery.com> wrote:
> Because the behavior of -O3 must not depend on whether optional libraries
> are linked into GCC, and we did not decide to make PPL and CLooG required
> to build GCC, so -O3 cannot enable any optimizations using optional
> libraries.
>

What would we have to do to make PPL and CLooG required to build GCC?

Sebastian Pop
--
AMD - GNU Tools

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

* Re: -O3 and new optimizations in 4.4.0
  2009-04-24 13:59   ` Sebastian Pop
@ 2009-04-24 14:05     ` Robert Dewar
  2009-04-24 14:12       ` Sebastian Pop
  0 siblings, 1 reply; 14+ messages in thread
From: Robert Dewar @ 2009-04-24 14:05 UTC (permalink / raw)
  To: Sebastian Pop; +Cc: Joseph S. Myers, David Ronis, gcc, Harle, Christophe

Sebastian Pop wrote:
> Hi,
> 
> On Thu, Apr 23, 2009 at 10:57, Joseph S. Myers <joseph@codesourcery.com> wrote:
>> Because the behavior of -O3 must not depend on whether optional libraries
>> are linked into GCC, and we did not decide to make PPL and CLooG required
>> to build GCC, so -O3 cannot enable any optimizations using optional
>> libraries.
>>
> 
> What would we have to do to make PPL and CLooG required to build GCC?

Why would that be desirable? Seems to me the current situation is
clearly preferable.

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

* Re: -O3 and new optimizations in 4.4.0
  2009-04-24 14:05     ` Robert Dewar
@ 2009-04-24 14:12       ` Sebastian Pop
  2009-04-24 14:22         ` Jack Howarth
                           ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Sebastian Pop @ 2009-04-24 14:12 UTC (permalink / raw)
  To: Robert Dewar; +Cc: Joseph S. Myers, David Ronis, gcc, Harle, Christophe

On Fri, Apr 24, 2009 at 08:12, Robert Dewar <dewar@adacore.com> wrote:
>> What would we have to do to make PPL and CLooG required to build GCC?
>
> Why would that be desirable? Seems to me the current situation is
> clearly preferable.

To enable loop transforms in -O3.

Sebastian Pop
--
AMD - GNU Tools

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

* Re: -O3 and new optimizations in 4.4.0
  2009-04-24 14:12       ` Sebastian Pop
@ 2009-04-24 14:22         ` Jack Howarth
  2009-04-24 17:30         ` Robert Dewar
  2009-04-25 17:35         ` Toon Moene
  2 siblings, 0 replies; 14+ messages in thread
From: Jack Howarth @ 2009-04-24 14:22 UTC (permalink / raw)
  To: Sebastian Pop
  Cc: Robert Dewar, Joseph S. Myers, David Ronis, gcc, Harle, Christophe

On Fri, Apr 24, 2009 at 08:30:37AM -0500, Sebastian Pop wrote:
> On Fri, Apr 24, 2009@08:12, Robert Dewar <dewar@adacore.com> wrote:
> >> What would we have to do to make PPL and CLooG required to build GCC?
> >
> > Why would that be desirable? Seems to me the current situation is
> > clearly preferable.
> 
> To enable loop transforms in -O3.
> 
> Sebastian Pop
> --
> AMD - GNU Tools
> 

Sebastian,
   I assume you are talking about enabling these optimizations
in -O3 for gcc 4.5. Unless the alias improvement changes
are backported for gcc 4.4.1, the graphite optimizations 
will yield performance degradations for the polyhedron 2005
benchmarks at -O3 in that case.
                   Jack

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

* Re: -O3 and new optimizations in 4.4.0
  2009-04-24 14:12       ` Sebastian Pop
  2009-04-24 14:22         ` Jack Howarth
@ 2009-04-24 17:30         ` Robert Dewar
  2009-04-25  9:06           ` Andi Kleen
  2009-04-25 17:35         ` Toon Moene
  2 siblings, 1 reply; 14+ messages in thread
From: Robert Dewar @ 2009-04-24 17:30 UTC (permalink / raw)
  To: Sebastian Pop; +Cc: Joseph S. Myers, David Ronis, gcc, Harle, Christophe

Sebastian Pop wrote:
> On Fri, Apr 24, 2009 at 08:12, Robert Dewar <dewar@adacore.com> wrote:
>>> What would we have to do to make PPL and CLooG required to build GCC?
>> Why would that be desirable? Seems to me the current situation is
>> clearly preferable.
> 
> To enable loop transforms in -O3.

To me, you would have to show very clearly a significant performance
gain for typical applications to justify the impact of adding
PPL and CLooG. I don't see it. If you want these transformations
you can get them, why go to all this disruptive effort for the
default optimization case?

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

* Re: -O3 and new optimizations in 4.4.0
  2009-04-24 17:30         ` Robert Dewar
@ 2009-04-25  9:06           ` Andi Kleen
  2009-04-25 10:46             ` Joe Buck
  0 siblings, 1 reply; 14+ messages in thread
From: Andi Kleen @ 2009-04-25  9:06 UTC (permalink / raw)
  To: Robert Dewar
  Cc: Sebastian Pop, Joseph S. Myers, David Ronis, gcc, Harle, Christophe

Robert Dewar <dewar@adacore.com> writes:

> Sebastian Pop wrote:
>> On Fri, Apr 24, 2009 at 08:12, Robert Dewar <dewar@adacore.com> wrote:
>>>> What would we have to do to make PPL and CLooG required to build GCC?
>>> Why would that be desirable? Seems to me the current situation is
>>> clearly preferable.
>> To enable loop transforms in -O3.
>
> To me, you would have to show very clearly a significant performance
> gain for typical applications to justify the impact of adding
> PPL and CLooG. I don't see it. If you want these transformations
> you can get them, why go to all this disruptive effort for the
> default optimization case?

I think his point was that they would be only widely used if they
were part of -O3 because likely most users are not willing to 
set individual -f optimization flags.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

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

* Re: -O3 and new optimizations in 4.4.0
  2009-04-25  9:06           ` Andi Kleen
@ 2009-04-25 10:46             ` Joe Buck
  0 siblings, 0 replies; 14+ messages in thread
From: Joe Buck @ 2009-04-25 10:46 UTC (permalink / raw)
  To: Andi Kleen
  Cc: Robert Dewar, Sebastian Pop, Joseph S. Myers, David Ronis, gcc,
	Harle, Christophe

On Fri, Apr 24, 2009 at 01:34:37PM -0700, Andi Kleen wrote:
> Robert Dewar <dewar@adacore.com> writes:
> 
> > Sebastian Pop wrote:
> >> On Fri, Apr 24, 2009 at 08:12, Robert Dewar <dewar@adacore.com> wrote:
> >>>> What would we have to do to make PPL and CLooG required to build GCC?
> >>> Why would that be desirable? Seems to me the current situation is
> >>> clearly preferable.
> >> To enable loop transforms in -O3.
> >
> > To me, you would have to show very clearly a significant performance
> > gain for typical applications to justify the impact of adding
> > PPL and CLooG. I don't see it. If you want these transformations
> > you can get them, why go to all this disruptive effort for the
> > default optimization case?
> 
> I think his point was that they would be only widely used if they
> were part of -O3 because likely most users are not willing to
> set individual -f optimization flags.

Agreed.  It might be a wise idea to include them in -O3 in 4.5,
provided that we are confident by then that they are a consistent win.
At that stage the libraries could be required.

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

* Re: -O3 and new optimizations in 4.4.0
  2009-04-24 14:12       ` Sebastian Pop
  2009-04-24 14:22         ` Jack Howarth
  2009-04-24 17:30         ` Robert Dewar
@ 2009-04-25 17:35         ` Toon Moene
  2 siblings, 0 replies; 14+ messages in thread
From: Toon Moene @ 2009-04-25 17:35 UTC (permalink / raw)
  To: Sebastian Pop
  Cc: Robert Dewar, Joseph S. Myers, David Ronis, gcc, Harle, Christophe

Sebastian Pop wrote:

> On Fri, Apr 24, 2009 at 08:12, Robert Dewar <dewar@adacore.com> wrote:
>>> What would we have to do to make PPL and CLooG required to build GCC?
>> Why would that be desirable? Seems to me the current situation is
>> clearly preferable.
> 
> To enable loop transforms in -O3.

Note that loop optimizations like vectorization were only enabled after 
a cost analysis was in place that assured us (on average) that only 
beneficial optimizations would be attempted.

Is that true for the loop transformations enabled by these optimizations 
as well ?

Kind regards,

-- 
Toon Moene - e-mail: toon@moene.org - phone: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
At home: http://moene.org/~toon/
Progress of GNU Fortran: http://gcc.gnu.org/gcc-4.4/changes.html

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

* Re: -O3 and new optimizations in 4.4.0
  2009-04-23 21:10 Kate Minola
@ 2009-04-23 21:42 ` Andrew Pinski
  0 siblings, 0 replies; 14+ messages in thread
From: Andrew Pinski @ 2009-04-23 21:42 UTC (permalink / raw)
  To: Kate Minola; +Cc: gcc, joseph

On Thu, Apr 23, 2009 at 12:11 PM, Kate Minola <kate01123@gmail.com> wrote:
> Ok, I am confused.  You imply that PPL and CLooG are NOT required to
> build GCC, yet
>
>     http://gcc.gnu.org/install/prerequisites.html
>
> lists them as prerequisites to a build.
>
> Who is correct?

Both, the website says:
Necessary to build GCC with the Graphite loop optimizations.

Witness the "with the Graphite loop optimizations" part of that
sentence.  So if you want the graphite loop optimizers you need PPL
and CLooG, otherwise you don't need them to compile GCC.

-- Pinski

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

* Re: -O3 and new optimizations in 4.4.0
@ 2009-04-23 21:10 Kate Minola
  2009-04-23 21:42 ` Andrew Pinski
  0 siblings, 1 reply; 14+ messages in thread
From: Kate Minola @ 2009-04-23 21:10 UTC (permalink / raw)
  To: gcc; +Cc: joseph

On Thu, 23 Apr 2009, Joseph S. Myers wrote:

> Because the behavior of -O3 must not depend on whether optional libraries
> are linked into GCC, and we did not decide to make PPL and CLooG required
> to build GCC, so -O3 cannot enable any optimizations using optional
> libraries.

Ok, I am confused.  You imply that PPL and CLooG are NOT required to
build GCC, yet

     http://gcc.gnu.org/install/prerequisites.html

lists them as prerequisites to a build.

Who is correct?

Kate Minola

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

end of thread, other threads:[~2009-04-25 14:42 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-23 17:09 -O3 and new optimizations in 4.4.0 David Ronis
2009-04-23 17:25 ` Joseph S. Myers
2009-04-23 17:38   ` David Ronis
2009-04-23 17:46     ` Joseph S. Myers
2009-04-24 13:59   ` Sebastian Pop
2009-04-24 14:05     ` Robert Dewar
2009-04-24 14:12       ` Sebastian Pop
2009-04-24 14:22         ` Jack Howarth
2009-04-24 17:30         ` Robert Dewar
2009-04-25  9:06           ` Andi Kleen
2009-04-25 10:46             ` Joe Buck
2009-04-25 17:35         ` Toon Moene
2009-04-23 21:10 Kate Minola
2009-04-23 21:42 ` Andrew Pinski

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