From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9742 invoked by alias); 21 Apr 2010 19:28:32 -0000 Received: (qmail 9734 invoked by uid 22791); 21 Apr 2010 19:28:31 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=BAYES_00,FREEMAIL_FROM,TW_LV X-Spam-Check-By: sourceware.org Received: from mathups.math.u-psud.fr (HELO matups.math.u-psud.fr) (129.175.52.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 21 Apr 2010 19:28:26 +0000 Received: from barah.math.u-psud.fr (barah.math.u-psud.fr [129.175.52.24]) by matups.math.u-psud.fr (Postfix) with ESMTP id 4F4127556; Wed, 21 Apr 2010 21:28:24 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by barah.math.u-psud.fr (Postfix) with ESMTP id 497D3474120; Wed, 21 Apr 2010 21:28:24 +0200 (CEST) Received: from barah.math.u-psud.fr ([127.0.0.1]) by localhost (barah.math.u-psud.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 26rrkgKVIrfP; Wed, 21 Apr 2010 21:28:22 +0200 (CEST) Received: from [IPv6:::1] (topodyn-ng.math.u-psud.fr [129.175.50.33]) by barah.math.u-psud.fr (Postfix) with ESMTP id 2550D474040; Wed, 21 Apr 2010 21:28:22 +0200 (CEST) Message-ID: <4BCF51D5.1020903@free.fr> Date: Wed, 21 Apr 2010 19:35:00 -0000 From: Duncan Sands User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100415 Thunderbird/3.0.4 MIME-Version: 1.0 To: Vladimir Makarov CC: Chris Lattner , Steven Bosscher , gcc@gcc.gnu.org Subject: Re: Some benchmark comparison of gcc4.5 and dragonegg (was dragonegg in FSF gcc?) References: <20100409163655.GA25781@bromo.med.uc.edu> <4BBF5B7C.7060801@starynkevitch.net> <4BC07718.3060400@free.fr> <4BC1D647.60902@free.fr> <4BCF2D93.1050709@redhat.com> <4BCF3FCD.4010203@redhat.com> In-Reply-To: <4BCF3FCD.4010203@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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: 2010-04/txt/msg00487.txt.bz2 Hi Vladimir, > Dragonegg does not work with -flto. It generates assembler code on which > gas complaints (a lot of non-assembler code like target data-layout > which are not in comments). actually it does work with -flto, in an awkward way. When you use -flto it spits out LLVM IR. You need to use -S, otherwise the system assembler tries (and fails) to compile this. You need to then use llvm-as to turn this into LLVM bitcode. You can then link and optimize the bitcode either by hand (using llvm-ld) or using the gold plugin, as described in http://llvm.org/docs/GoldPlugin.html It is annoying that gcc insists on running the system assembler when passed -c. Not running the assembler isn't only good for avoiding the -S + llvm-as rigmarole mentioned above. LLVM is now capable of writing out object files directly, i.e. without having to pass via an assembler at all. It would be neat if I could have the plugin immediately write out the final object file if -c is passed. I didn't work out how to do this yet. It probably requires some gcc modifications, so maybe something can be done for gcc-4.6. For transparent LTO another possibility is to encode LLVM bitcode in the assembler in the same way as gcc does for gimple when passed -flto. I didn't investigate this yet. Ciao, Duncan.