From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10729 invoked by alias); 12 Apr 2010 18:03:27 -0000 Received: (qmail 10668 invoked by uid 22791); 12 Apr 2010 18:03:26 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-pz0-f175.google.com (HELO mail-pz0-f175.google.com) (209.85.222.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 12 Apr 2010 18:03:22 +0000 Received: by pzk5 with SMTP id 5so3507674pzk.14 for ; Mon, 12 Apr 2010 11:03:20 -0700 (PDT) Received: by 10.142.3.19 with SMTP id 19mr1888693wfc.200.1271095400394; Mon, 12 Apr 2010 11:03:20 -0700 (PDT) Received: from [192.168.2.99] (cpc2-cmbg8-0-0-cust61.cmbg.cable.ntl.com [82.6.108.62]) by mx.google.com with ESMTPS id e40sm592129wfj.11.2010.04.12.11.03.18 (version=SSLv3 cipher=RC4-MD5); Mon, 12 Apr 2010 11:03:19 -0700 (PDT) Message-ID: <4BC364D4.8080907@gmail.com> Date: Mon, 12 Apr 2010 18:05:00 -0000 From: Dave Korn User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Andrew Haley CC: gcc@gcc.gnu.org Subject: Re: Release novops attribute for external use? References: <7FB04A5C213E9943A72EE127DB74F0ADA66512E863@SJEXCHCCR02.corp.ad.broadcom.com> <4BC34B67.8090008@redhat.com> In-Reply-To: <4BC34B67.8090008@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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/msg00252.txt.bz2 On 12/04/2010 17:33, Andrew Haley wrote: > On 04/12/2010 05:27 PM, Bingfeng Mei wrote: >> Hello, >> One of our engineers requested a feature so that >> compiler can avoid to re-load variables after a function >> call if it is known not to write to memory. It should >> slash considerable code size in our applications. I found >> the existing "pure" and "const" cannot meet his requirements >> because the function is optimized out if it doesn't return >> a value. > > If a function doesn't write to memory and it doesn't return a > value, what is the point of calling it? Delay-loop! That's about the only thing I can think of anyway :-) cheers, DaveK