From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38118 invoked by alias); 30 Sep 2015 12:18:41 -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 36743 invoked by uid 89); 30 Sep 2015 12:18:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qg0-f48.google.com Received: from mail-qg0-f48.google.com (HELO mail-qg0-f48.google.com) (209.85.192.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 30 Sep 2015 12:18:39 +0000 Received: by qgev79 with SMTP id v79so32538447qge.0 for ; Wed, 30 Sep 2015 05:18:37 -0700 (PDT) X-Received: by 10.140.237.207 with SMTP id i198mr4121289qhc.45.1443615517530; Wed, 30 Sep 2015 05:18:37 -0700 (PDT) Received: from ?IPv6:2601:181:c000:c497:a2a8:cdff:fe3e:b48? ([2601:181:c000:c497:a2a8:cdff:fe3e:b48]) by smtp.googlemail.com with ESMTPSA id z196sm113438qhd.22.2015.09.30.05.18.36 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Sep 2015 05:18:36 -0700 (PDT) Subject: Re: Fold acc_on_device To: Richard Biener References: <560AD6A6.4050109@acm.org> Cc: Bernd Schmidt , GCC Patches , Jakub Jelinek From: Nathan Sidwell Message-ID: <560BD31C.9020503@acm.org> Date: Wed, 30 Sep 2015 12:40:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2015-09/txt/msg02326.txt.bz2 On 09/30/15 04:07, Richard Biener wrote: > On Tue, Sep 29, 2015 at 8:21 PM, Nathan Sidwell wrote: >> This patch folds acc_on_device as a regular builtin, but postponed until we >> know which compiler we're in. As suggested by Bernd, we use the existing >> builtin folding machinery. >> >> Trunk is still using the older PTX runtime scheme (Thomas is working on >> that), so the only change there is in the host-side libgomp piece. >> >> Ok for trunk? > > 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? nathan