From patchwork Tue Oct 18 19:38:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 683841 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sz5430cf7z9s3s for ; Wed, 19 Oct 2016 06:39:14 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=fBMOK9cj; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:in-reply-to:references:date:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=a9I Nf1LQFF/dADPEQV8+PU0xN4JZOdzunjYwaGEK14SfiMWpyFSgjE1JhC8IUlEZCNC tCK/rR75UGWYKpEQJ4dNOiHR6b7IhKSGNMqHZ6uhxUFUgd6GmuLL87mWR/3bVeCy +9pte4TuOxQN1CuWlFW/DGs5zErPycBuEyC7hFmU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:in-reply-to:references:date:message-id:mime-version :content-type:content-transfer-encoding; s=default; bh=VmU2CRXx8 oLM8N3OzeSs0OuElWU=; b=fBMOK9cj6e2mp0W12l2PsGS8N5c78GF4C4fGey5GS BjVvn9l5zzkW0hBohtX9i53vnBUHFORIuihSVC381vCyXZ3jJQ0KSmlXSfmWPRtH oG8BOcYwxxBG1aMzoFIUIG6+hOopbJ+vOL2rIUeZkBipT81vBtbxxJUrbazt1XjG y8= Received: (qmail 63977 invoked by alias); 18 Oct 2016 19:39:04 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 63962 invoked by uid 89); 18 Oct 2016 19:39:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy=Hx-languages-length:2297 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 18 Oct 2016 19:38:52 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1bwaDp-0001Hb-3i from Thomas_Schwinge@mentor.com ; Tue, 18 Oct 2016 12:38:49 -0700 Received: from hertz.schwinge.homeip.net (137.202.0.87) by svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Tue, 18 Oct 2016 20:38:45 +0100 From: Thomas Schwinge To: Richard Biener , Richard Biener , GCC Patches Subject: Re: Use FOR_ALL_BB_FN in a few more places In-Reply-To: <6143D53F-261A-49E5-97A6-D7CDEA3FA8D6@suse.de> References: <87pomz15n4.fsf@kepler.schwinge.homeip.net> <87lgxn0xgh.fsf@hertz.schwinge.homeip.net> <6143D53F-261A-49E5-97A6-D7CDEA3FA8D6@suse.de> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Tue, 18 Oct 2016 21:38:41 +0200 Message-ID: <87funtwipq.fsf@hertz.schwinge.homeip.net> MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) Hi! On Tue, 18 Oct 2016 07:38:17 +0200, Richard Biener wrote: > On October 17, 2016 6:09:02 PM GMT+02:00, Thomas Schwinge wrote: > >[FOR_ALL_BB_FN] > > > >We could use the former in a few more places; OK for trunk once tested? > > OK. As posted, committed to trunk in r241315: commit 195917446a84dd216ec19c6657b298dcb57e039d Author: tschwinge Date: Tue Oct 18 19:36:45 2016 +0000 Use FOR_ALL_BB_FN in a few more places gcc/ * cfg.c (clear_bb_flags): Use FOR_ALL_BB_FN. * config/nvptx/nvptx.c (nvptx_find_sese): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241315 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/cfg.c | 2 +- gcc/config/nvptx/nvptx.c | 8 +------- 3 files changed, 7 insertions(+), 8 deletions(-) Grüße Thomas diff --git gcc/ChangeLog gcc/ChangeLog index 4922809..6002dde 100644 --- gcc/ChangeLog +++ gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-10-18 Thomas Schwinge + + * cfg.c (clear_bb_flags): Use FOR_ALL_BB_FN. + * config/nvptx/nvptx.c (nvptx_find_sese): Likewise. + 2016-10-18 Kelvin Nilsen * config/rs6000/altivec.h (vec_xl_len): New macro. diff --git gcc/cfg.c gcc/cfg.c index ee2e42c..6604b02 100644 --- gcc/cfg.c +++ gcc/cfg.c @@ -386,7 +386,7 @@ clear_bb_flags (void) { basic_block bb; - FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR_FOR_FN (cfun), NULL, next_bb) + FOR_ALL_BB_FN (bb, cfun) bb->flags &= BB_FLAGS_TO_PRESERVE; } diff --git gcc/config/nvptx/nvptx.c gcc/config/nvptx/nvptx.c index 6ec8eb4..80fa9ae 100644 --- gcc/config/nvptx/nvptx.c +++ gcc/config/nvptx/nvptx.c @@ -3091,17 +3091,11 @@ nvptx_find_sese (auto_vec &blocks, bb_pair_vec_t ®ions) int ix; /* First clear each BB of the whole function. */ - FOR_EACH_BB_FN (block, cfun) + FOR_ALL_BB_FN (block, cfun) { block->flags &= ~BB_VISITED; BB_SET_SESE (block, 0); } - block = EXIT_BLOCK_PTR_FOR_FN (cfun); - block->flags &= ~BB_VISITED; - BB_SET_SESE (block, 0); - block = ENTRY_BLOCK_PTR_FOR_FN (cfun); - block->flags &= ~BB_VISITED; - BB_SET_SESE (block, 0); /* Mark blocks in the function that are in this graph. */ for (ix = 0; blocks.iterate (ix, &block); ix++)