From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15016 invoked by alias); 13 Jul 2011 15:33:45 -0000 Received: (qmail 15008 invoked by uid 22791); 13 Jul 2011 15:33:44 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 13 Jul 2011 15:33:28 +0000 Received: from wpaz33.hot.corp.google.com (wpaz33.hot.corp.google.com [172.24.198.97]) by smtp-out.google.com with ESMTP id p6DFXS3B017624 for ; Wed, 13 Jul 2011 08:33:28 -0700 Received: from gxk2 (gxk2.prod.google.com [10.202.11.2]) by wpaz33.hot.corp.google.com with ESMTP id p6DFXQbY018230 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Wed, 13 Jul 2011 08:33:27 -0700 Received: by gxk2 with SMTP id 2so2853331gxk.8 for ; Wed, 13 Jul 2011 08:33:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.151.21.17 with SMTP id y17mr1396555ybi.13.1310571206554; Wed, 13 Jul 2011 08:33:26 -0700 (PDT) Received: by 10.151.142.15 with HTTP; Wed, 13 Jul 2011 08:33:25 -0700 (PDT) In-Reply-To: <32052838.post@talk.nabble.com> References: <32052838.post@talk.nabble.com> Date: Wed, 13 Jul 2011 15:55:00 -0000 Message-ID: Subject: Re: IPA and LTO From: Diego Novillo To: AJM-2 Cc: gcc@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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: 2011-07/txt/msg00223.txt.bz2 On Wed, Jul 13, 2011 at 10:22, AJM-2 wrote: > My question is whether LTO can be used in this way, to have a simple ipa > pass called once at link time with access to the function bodies, and if = so > how is this achieved? =C2=A0cgraph_function_body_availability seems to on= ly be > half the story. Yes, it can. You seem to be describing what GCC calls "simple IPA pass". These are passes that cannot run in partitioned LTO mode, as they require the function bodies to operate. Look for passes like pass_ipa_function_and_variable_visibility for an example of a simple IPA pass. Diego.