public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Guenther <richard.guenther@gmail.com>
To: Diego Novillo <dnovillo@google.com>
Cc: Basile STARYNKEVITCH <basile@starynkevitch.net>,
	GCC Mailing List <gcc@gcc.gnu.org>
Subject: Re: is LTO aimed for large programs?
Date: Mon, 09 Nov 2009 12:48:00 -0000	[thread overview]
Message-ID: <84fc9c000911090447jcda0a3bje34fab297ad9fbb5@mail.gmail.com> (raw)
In-Reply-To: <b798aad50911090435q69b5f28fv961fb1cafab8310f@mail.gmail.com>

On Mon, Nov 9, 2009 at 1:35 PM, Diego Novillo <dnovillo@google.com> wrote:
> On Sun, Nov 8, 2009 at 18:03, Basile STARYNKEVITCH
> <basile@starynkevitch.net> wrote:
>
>> Perhaps the question is when not to use -flto and use -fwhopr instead?
>
> I don't think anyone has systematically tried to determine these
> limits.  The original design tried to address a specific instance of a
> program with about 400 million callgraph nodes.  At the time, -flto
> was running out of virtual addressing space to hold it (the gcc binary
> was 32 bits), but it could be processed with -fwhopr.

Hm, as WPA needs the whole cgraph in memory and a single
cgraph node (not counting any edges or decls) is 256 bytes
large that would require 97GB ram alone for cgraph nodes.
So I don't believe you ;)  Even with 400 thousand cgraph nodes
you'd run out of virtual memory on 32bits unless the cgraph
node size on 32bit is less than 10 bytes which it is of course not ...
(btw, a function decl is also 240 bytes).

I think we can scale to a million cgraph nodes on a 64bit
host with lots of memory (remember we need to pull in
all decls and types during WPA phase).

Richard.

  reply	other threads:[~2009-11-09 12:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-08 23:03 Basile STARYNKEVITCH
2009-11-08 23:31 ` Robert Dewar
2009-11-09  6:43   ` Basile STARYNKEVITCH
2009-11-09  7:13     ` Eric Botcazou
2009-11-09  9:44 ` Tobias Burnus
2009-11-09  9:57   ` Richard Guenther
2009-11-12 16:46   ` Jan Hubicka
2009-11-12 17:01     ` Robert Dewar
2009-11-09 12:35 ` Diego Novillo
2009-11-09 12:48   ` Richard Guenther [this message]
2009-11-09 12:52     ` Diego Novillo

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=84fc9c000911090447jcda0a3bje34fab297ad9fbb5@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=basile@starynkevitch.net \
    --cc=dnovillo@google.com \
    --cc=gcc@gcc.gnu.org \
    /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).