From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3935 invoked by alias); 9 Nov 2009 12:48:01 -0000 Received: (qmail 3913 invoked by uid 22791); 9 Nov 2009 12:48:00 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-pz0-f181.google.com (HELO mail-pz0-f181.google.com) (209.85.222.181) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 09 Nov 2009 12:47:56 +0000 Received: by pzk11 with SMTP id 11so1980753pzk.14 for ; Mon, 09 Nov 2009 04:47:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.187.8 with SMTP id k8mr424698rvf.98.1257770871968; Mon, 09 Nov 2009 04:47:51 -0800 (PST) In-Reply-To: References: <4AF74E2A.2030703@starynkevitch.net> Date: Mon, 09 Nov 2009 12:48:00 -0000 Message-ID: <84fc9c000911090447jcda0a3bje34fab297ad9fbb5@mail.gmail.com> Subject: Re: is LTO aimed for large programs? From: Richard Guenther To: Diego Novillo Cc: Basile STARYNKEVITCH , GCC Mailing List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-11/txt/msg00241.txt.bz2 On Mon, Nov 9, 2009 at 1:35 PM, Diego Novillo wrote: > On Sun, Nov 8, 2009 at 18:03, Basile STARYNKEVITCH > 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. =A0The original design tried to address a specific instance of a > program with about 400 million callgraph nodes. =A0At 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.