From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31514 invoked by alias); 31 Jan 2004 00:58:04 -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 31502 invoked from network); 31 Jan 2004 00:58:03 -0000 Received: from unknown (HELO mail-out3.apple.com) (17.254.13.22) by sources.redhat.com with SMTP; 31 Jan 2004 00:58:03 -0000 Received: from mailgate1.apple.com (a17-128-100-225.apple.com [17.128.100.225]) by mail-out3.apple.com (8.12.10/8.12.11) with ESMTP id i0V0w3Bv013430 for ; Fri, 30 Jan 2004 16:58:03 -0800 (PST) Received: from relay3.apple.com (relay3.apple.com) by mailgate1.apple.com (Content Technologies SMTPRS 4.3.6) with ESMTP id ; Fri, 30 Jan 2004 16:58:03 -0800 Received: from [17.201.21.123] (stravinsky.apple.com [17.201.21.123]) by relay3.apple.com (8.12.9/8.12.11) with ESMTP id i0V0w16I009873; Sat, 31 Jan 2004 00:58:01 GMT In-Reply-To: <1075510461.8251.18.camel@localhost.localdomain> References: <1075510461.8251.18.camel@localhost.localdomain> Mime-Version: 1.0 (Apple Message framework v609) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <842A2B33-5388-11D8-93D6-0003931B8A28@apple.com> Content-Transfer-Encoding: 7bit Cc: GCC List From: Syd Polk Subject: Re: Help restricting args of an intrinsic function Date: Sat, 31 Jan 2004 01:07:00 -0000 To: Diego Novillo X-SW-Source: 2004-01/txt/msg02299.txt.bz2 On Jan 30, 2004, at 4:54 PM, Diego Novillo wrote: > On Fri, 2004-01-30 at 19:46, Syd Polk wrote: > >> How can I safely: >> - Determine if a value is really a compile-time constant? >> - Get the value of that constant? >> > If you could wait a little while until tree-ssa is merged in mainline, > this would be relatively simple to implement inside the tree > optimizers. > > So, if the compiler cannot assert that the arguments are compile-time > constants, you want to emit an error? Not only that, but compile-time constants in a certain range. __builtin_prefetch does something similar, but only supports actual integers in the source code; it has the same characteristics as my original implementation. > > > Diego. > > Syd Polk Apple Computer Technology EPM, Mac OS X Development Tools +1 408 974-0577