public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* -fmove-all-movables and -freduce-all-givs
@ 2004-04-26 21:41 Mark Stephenson
  2004-04-26 22:22 ` Ian Lance Taylor
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Mark Stephenson @ 2004-04-26 21:41 UTC (permalink / raw)
  To: gcc, fortran

Sorry to bother you,

I'm currently researching how machine learning algorithms can be 
employed to discover effective compiler heuristics.  I see from your 
online documentation that -fmove-all-movables and -freduce-all-givs can 
sometimes generate slower code.

These optimizations seem like prime candidates for machine learning 
because the tradeoffs are not clear (in my mind it seems like the 
optimizations should always yield speedups).

Can you please let me know for which applications these optimizations 
are detrimental to performance?  And do you have any intuition as to why 
they are detrimental?

Thanks a lot,
Mark Stephenson

p.s. - I've been using the Open Research Compiler to perform my 
research, but I am now looking to switch over to gcc and g77.

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

* Re: -fmove-all-movables and -freduce-all-givs
  2004-04-26 21:41 -fmove-all-movables and -freduce-all-givs Mark Stephenson
@ 2004-04-26 22:22 ` Ian Lance Taylor
  2004-04-26 22:36 ` Joern Rennecke
  2004-05-10 13:59 ` Toon Moene
  2 siblings, 0 replies; 4+ messages in thread
From: Ian Lance Taylor @ 2004-04-26 22:22 UTC (permalink / raw)
  To: Mark Stephenson; +Cc: gcc, fortran

Mark Stephenson <mstephen@MIT.EDU> writes:

> I'm currently researching how machine learning algorithms can be
> employed to discover effective compiler heuristics.  I see from your
> online documentation that -fmove-all-movables and -freduce-all-givs
> can sometimes generate slower code.
> 
> These optimizations seem like prime candidates for machine learning
> because the tradeoffs are not clear (in my mind it seems like the
> optimizations should always yield speedups).

You may want to look at
    http://www.coyotegulch.com/acovea/index.html

Ian

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

* Re: -fmove-all-movables and -freduce-all-givs
  2004-04-26 21:41 -fmove-all-movables and -freduce-all-givs Mark Stephenson
  2004-04-26 22:22 ` Ian Lance Taylor
@ 2004-04-26 22:36 ` Joern Rennecke
  2004-05-10 13:59 ` Toon Moene
  2 siblings, 0 replies; 4+ messages in thread
From: Joern Rennecke @ 2004-04-26 22:36 UTC (permalink / raw)
  To: Mark Stephenson; +Cc: gcc, fortran

> I'm currently researching how machine learning algorithms can be 
> employed to discover effective compiler heuristics.  I see from your 
> online documentation that -fmove-all-movables and -freduce-all-givs can 
> sometimes generate slower code.
> 
> These optimizations seem like prime candidates for machine learning 
> because the tradeoffs are not clear (in my mind it seems like the 
> optimizations should always yield speedups).

Only if your processor has an infinite number of registers what can
be addressed with equal cost.

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

* Re: -fmove-all-movables and -freduce-all-givs
  2004-04-26 21:41 -fmove-all-movables and -freduce-all-givs Mark Stephenson
  2004-04-26 22:22 ` Ian Lance Taylor
  2004-04-26 22:36 ` Joern Rennecke
@ 2004-05-10 13:59 ` Toon Moene
  2 siblings, 0 replies; 4+ messages in thread
From: Toon Moene @ 2004-05-10 13:59 UTC (permalink / raw)
  To: Mark Stephenson; +Cc: gcc, fortran

Mark Stephenson wrote:

I'm currently researching how machine learning algorithms can be 
employed to discover effective compiler heuristics.  I see from your 
online documentation that -fmove-all-movables and -freduce-all-givs can 
sometimes generate slower code.

These optimizations seem like prime candidates for machine learning 
because the tradeoffs are not clear (in my mind it seems like the 
optimizations should always yield speedups).

Can you please let me know for which applications these optimizations 
are detrimental to performance?  And do you have any intuition as to why 
they are detrimental?
[ Sorry for the late reply - I was behind on e-mail for more than a week ]

-fmove-all-movables and -freduce-all-givs are mostly beneficial for code 
that looks a lot like most Fortran code: Subroutines with large nested 
loops over multiple multi-rank arrays that are arguments to the routine.

It turns out that the heuristic to prevent register spills due to too 
many registers being necessary to hold induction variables and loop 
invariants is actually off in the case mentioned above.

Both flags force the compiler to bypass the heuristic.

I hope this helps,

--
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
GNU Fortran 95: http://gcc.gnu.org/fortran/ (under construction)

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

end of thread, other threads:[~2004-05-10 13:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-26 21:41 -fmove-all-movables and -freduce-all-givs Mark Stephenson
2004-04-26 22:22 ` Ian Lance Taylor
2004-04-26 22:36 ` Joern Rennecke
2004-05-10 13:59 ` Toon Moene

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