From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24201 invoked by alias); 11 Jun 2010 21:36:58 -0000 Received: (qmail 24191 invoked by uid 22791); 11 Jun 2010 21:36:58 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-vw0-f47.google.com (HELO mail-vw0-f47.google.com) (209.85.212.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 11 Jun 2010 21:36:53 +0000 Received: by vws11 with SMTP id 11so1656542vws.20 for ; Fri, 11 Jun 2010 14:36:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.52.155 with SMTP id i27mr975448qag.225.1276292208331; Fri, 11 Jun 2010 14:36:48 -0700 (PDT) Received: by 10.220.100.77 with HTTP; Fri, 11 Jun 2010 14:36:48 -0700 (PDT) In-Reply-To: <20100611151604.GC7958@kam.mff.cuni.cz> References: <20100611151604.GC7958@kam.mff.cuni.cz> Date: Fri, 11 Jun 2010 22:02:00 -0000 Message-ID: Subject: Re: Improve ipa-pure-const handling of builtins From: "H.J. Lu" To: Jan Hubicka Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2010-06/txt/msg01261.txt.bz2 On Fri, Jun 11, 2010 at 8:16 AM, Jan Hubicka wrote: > Hi, > while looking on statistics, I noticed that quite large portion of functi= ons are not > pure/const because they call alloca or __builtin_unreachable. =A0 This pa= tch adds code > to ipa-pure-const.c to recognize builtins that are special in a way that = they can > not be const/pure, but function calling them can. > > Bootstrapped/regtested x86_64-linux, commited. > Honza > > =A0 =A0 =A0 =A0* ipa-pure-const.c (special_builtlin_state): New function. > =A0 =A0 =A0 =A0(check_call): Use it instead of special casign BUILT_IN_RE= TURN. > =A0 =A0 =A0 =A0(propagate_pure_const): Use it. > This caused: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D44505 --=20 H.J.