This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: is LTO aimed for large programs?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]