public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Steven Bosscher <stevenb@suse.de>
To: Jan Hubicka <jh@suse.cz>
Cc: Razya Ladelsky <RAZYA@il.ibm.com>,
	gcc-patches@gcc.gnu.org, hubicka@ucw.cz,
	Mircea Namolaru <NAMOLARU@il.ibm.com>,
	Ayal Zaks <ZAKS@il.ibm.com>,
	Kenneth Zadeck <zadeck@naturalbridge.com>
Subject: IPA (was: Re: [tree-profiling-branch PATCH] Function cloning + IPCP extension  (RESUBMISSION))
Date: Sun, 10 Oct 2004 23:00:00 -0000	[thread overview]
Message-ID: <200410110041.07171.stevenb@suse.de> (raw)
In-Reply-To: <20041010205940.GB912@kam.mff.cuni.cz>

On Sunday 10 October 2004 22:59, Jan Hubicka wrote:
> While I personally agree with the scheme you outlined (and also
> described it in the GCC Summit paper), the requirement of not loading
> whole program into memory at once (so relying only on global date while
> doing IPA and performing the actual transformations later) actually
> brings some stress on the implementation of IPA optimizers (ie
> optimizers done after inlining needs to deal with the clones and it is
> dificult to iterate optimizations like we commonly do for local
> optimizations).

In my mental model, inlining and cloning would be one of the
last optimizations to do on the call graph.  Wouldn't it be a
simple matter of adding the clones to the call graph and moving
on as if it is a normal compilation?  At least you would not
actually do any IPA on clones and functions after inlining.
That would  require re-analyzing the function to get the global
data right, wouldn't it?



>  In fact Kenneth already suggested in private mail to
> not use this approach and instead load everything in the memory at once
> and do kind of iteration on the IPA.

Can you show some pseudo-algorithm of how this would work?


>  I would like to hear some opinions
> here.

Hmm, obviously it depends on how much we can improve on memory
efficiency, there is obvioulsy a lot of room for improvements
there if we could move to saner data structures.  Everyone knows
we're a *little* memory wasteful right now ;-)

But even then, I wonder if you could take the source of a very
large code base (say, GCC itself, or the linux kernel), and do
link time whole program optimizations on it if you have to keep
everything in memory.

And iterating (or perhaps worklist based?) IPA doesn't sound very
attractive either.  I suppose you could offer it as an option at
some very high optimization level, but does it really pay off in
general to do IPA so aggressively?  Is the benefit large enough to
justify a complicated and probably compile time expensive framework
like that?

In any case, we'll be stuck on doing everything in-memory at first
anyway, so we'll have the opportunity to experiment a bit, and that
will be interesting.  Of course, making pre-inlining optimizations
possible is the most important thing for now...

Gr.
Steven




  reply	other threads:[~2004-10-10 22:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-10 15:38 [tree-profiling-branch PATCH] Function cloning + IPCP extension (RESUBMISSION) Razya Ladelsky
2004-10-10 17:10 ` Steven Bosscher
2004-10-10 21:25   ` Jan Hubicka
2004-10-10 23:00     ` Steven Bosscher [this message]
2004-10-10 23:34       ` IPA (was: Re: [tree-profiling-branch PATCH] Function cloning + IPCP extension (RESUBMISSION)) Jan Hubicka
2004-10-12 14:22         ` IPA Kenneth Zadeck
2004-10-12 14:41           ` IPA Jan Hubicka
     [not found]             ` <OF392747EC.15519132-ONC2256F2D.00576111-C2256F2D.005769AD@il.ibm.com>
2004-10-14 16:44               ` IPA Jan Hubicka
2004-10-14 17:22               ` IPA Kenneth Zadeck
     [not found]               ` <416EADEA.2030406@naturalbridge.com>
2004-10-14 17:24                 ` IPA Steven Bosscher
2004-10-14 21:25                   ` IPA Mark Mitchell
2004-10-15  3:39                 ` IPA Daniel Berlin
2004-10-12 14:18 ` [tree-profiling-branch PATCH] Function cloning + IPCP extension (RESUBMISSION) Jan Hubicka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200410110041.07171.stevenb@suse.de \
    --to=stevenb@suse.de \
    --cc=NAMOLARU@il.ibm.com \
    --cc=RAZYA@il.ibm.com \
    --cc=ZAKS@il.ibm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --cc=jh@suse.cz \
    --cc=zadeck@naturalbridge.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).