From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14757 invoked by alias); 1 Oct 2015 17:00:15 -0000 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 Received: (qmail 14728 invoked by uid 89); 1 Oct 2015 17:00:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 01 Oct 2015 17:00:13 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id C1A80461E3; Thu, 1 Oct 2015 17:00:12 +0000 (UTC) Received: from [10.10.58.192] (vpn-58-192.rdu2.redhat.com [10.10.58.192]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t91H0BKK001544; Thu, 1 Oct 2015 13:00:11 -0400 Subject: Re: Fold acc_on_device To: Richard Biener , Nathan Sidwell References: <560AD6A6.4050109@acm.org> <560BD31C.9020503@acm.org> Cc: Bernd Schmidt , GCC Patches , Jakub Jelinek From: Andrew MacLeod Message-ID: <560D669B.6030709@redhat.com> Date: Thu, 01 Oct 2015 17:00:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00102.txt.bz2 On 09/30/2015 08:46 AM, Richard Biener wrote: > On Wed, Sep 30, 2015 at 2:18 PM, Nathan Sidwell wrote: > > Please don't add any new GENERIC based builtin folders. Instead add to > gimple-fold.c:gimple_fold_builtin > > Otherwise you're just generating more work for us who move foldings from > builtins.c to gimple-fold.c. >> >> Oh, sorry, I didn't know about that. Will fix. >> >> Should I use the same >> if (symtab->state == EXPANSION) >> test to make sure we're after LTO read back (i.e. know which compiler we're >> in), or is there another way? > I don't know of a better way, no. I'll add a comment to builtins.c > (not that I expect anyone sees it ;)) > > btw, not that it's necessarily important, but I'm about to submit the include reduction patches today, and it turns out this line is the first use of anything from cgraph.h in builtins.c. So if this is "the way" of doing the test, be aware it adds a dependency on cgraph.h that wasn't there before. I noticed because the reducer finished on a 9/28 branch . When I re-applied the patch to a 9/30 branch, builtins.c failed to compile because it wasn't including cgraph.h for 'symtab' and 'EXPANSION'. So it wasn't required in 9/28. Going forward, it will be obvious when we are adding a new dependency because the file will fail to compile without adding the requisite header file. Andrew