From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29453 invoked by alias); 20 Jun 2005 15:29:07 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 29050 invoked by uid 22791); 20 Jun 2005 15:28:21 -0000 Received: from topconrd.ru (HELO TopconRD.RU) (62.105.138.7) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 20 Jun 2005 15:28:20 +0000 Received: from osv.topcon.com (ttc.topconrd.ru [62.105.138.5]) by TopconRD.RU (8.12.3/8.12.3/Debian-6.6) with ESMTP id j5KFSHL0024430; Mon, 20 Jun 2005 19:28:17 +0400 To: Andrew Pinski Cc: gcc@gcc.gnu.org Subject: Re: How to replace -O1 with corresponding -f's? References: <878y159mhr.fsf@osv.topcon.com> <17078.52477.408454.106678@zapata.pink> <44a7432710d6ca83042f60c9fbab58d9@physics.uc.edu> <87zmtl84eo.fsf@osv.topcon.com> X-attribution: osv From: Sergei Organov Date: Mon, 20 Jun 2005 15:29:00 -0000 In-Reply-To: Message-ID: <87r7ex82ur.fsf@osv.topcon.com> User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2005-06/txt/msg00908.txt.bz2 Andrew Pinski writes: > On Jun 20, 2005, at 10:54 AM, Sergei Organov wrote: > > > so SYMBOL_FLAG_SMALL (flags 0x6 vs 0x2) is somehow being missed when -O1 > > > is turned on. Seems to be something at tree-to-RTX conversion time. > > Constant folding? > > No, it would mean that the target says that this is not a small data. > Also try it with the following code and you will see there is no difference: > > double osvf() { return 314314314; } There is no difference in the sense that here both -O0 and -O1 behave roughly the same. So the problem is with detecting "smallness" for true constants by the target, right? But even then, if I fix that, there still will be a problem that for given platform there doesn't seem to be a single reason to replace double const osv = 314314314; double osvf() { return osv; } with double const osv = 314314314; double const .LC0 = 314314314; double osvf() { return .LCO; } where .LCO is compiler-generated symbol. And the latter does have something to do with const folding, doesn't it? -- Sergei.