From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26540 invoked by alias); 8 Mar 2008 02:10:34 -0000 Received: (qmail 26529 invoked by uid 22791); 8 Mar 2008 02:10:33 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.45.13) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 08 Mar 2008 02:10:14 +0000 Received: from zps19.corp.google.com (zps19.corp.google.com [172.25.146.19]) by smtp-out.google.com with ESMTP id m282A61J022085; Fri, 7 Mar 2008 18:10:06 -0800 Received: from smtp.corp.google.com (spacemonkey2.corp.google.com [192.168.120.114]) by zps19.corp.google.com with ESMTP id m282A55J031956 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 7 Mar 2008 18:10:06 -0800 Received: from localhost.localdomain.google.com (69-36-227-131.cust.layer42.net [69.36.227.131] (may be forged)) (authenticated bits=0) by smtp.corp.google.com (8.13.8/8.13.8) with ESMTP id m282A3HZ005095 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 7 Mar 2008 18:10:05 -0800 To: "Aparna Jain \(apjain\)" Cc: Subject: Re: problem with -funit-at-a-time References: From: Ian Lance Taylor Date: Sat, 08 Mar 2008 02:10:00 -0000 In-Reply-To: (Aparna Jain's message of "Thu\, 6 Mar 2008 15\:56\:01 +0530") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-03/txt/msg00077.txt.bz2 "Aparna Jain (apjain)" writes: > The code generated by 3.4.5 is no more assumes the first function of a C > file as the starting Address of the compiled code. I think this is > because of -funit-at-a-time which is enabled by default by O2 option. ... > I used -fno-unit-at-a-time , and it was fine. But just concerned about > the throughput of the code generated. Is there any other way to deal > with this problem ? If you need the output to be in the same order as the input, then in gcc 3.4.5 -fno-unit-at-a-time is the right approach. In gcc 4.2 and later, you can instead use -fno-toplevel-reorder, which retains the ordering while also giving you the performance benefits of -funit-at-a-time. Ian