From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25108 invoked by alias); 13 Jul 2011 13:45:15 -0000 Received: (qmail 25088 invoked by uid 22791); 13 Jul 2011 13:45:14 -0000 X-SWARE-Spam-Status: No, hits=0.4 required=5.0 tests=BAYES_05,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from sam.nabble.com (HELO sam.nabble.com) (216.139.236.26) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 13 Jul 2011 13:44:39 +0000 Received: from isper.nabble.com ([192.168.236.156]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1Qgzjy-0003GA-8r for gcc@gcc.gnu.org; Wed, 13 Jul 2011 06:44:38 -0700 Message-ID: <32052768.post@talk.nabble.com> Date: Wed, 13 Jul 2011 13:47:00 -0000 From: AJM-2 To: gcc@gcc.gnu.org Subject: IPA and LTO MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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/msg00214.txt.bz2 Hello, I have written a simple ipa pass and would like to make use of Link time optimisation. My pass requires access to the function bodies and ideally I would like the driver function to be called once at link time and have access to functions in all of the files as if they were one compilation unit. The documentation would indicate that this is possible, but ad hoc instrumentation of some of the other simple ipa passes seems to suggest different behaviour. 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? cgraph_function_body_availability seems to only be half the story. I am using GCC 4.6.0 with the gold linker plugin (binutils 2.21). Andrew -- View this message in context: http://old.nabble.com/IPA-and-LTO-tp32052768p32052768.html Sent from the gcc - Dev mailing list archive at Nabble.com.