From patchwork Wed Sep 14 19:21:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tbsaunde+gcc@tbsaunde.org X-Patchwork-Id: 670069 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 3sZB754ZpZz9sDG for ; Thu, 15 Sep 2016 05:14:25 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=K2v+L36t; 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:date:message-id:in-reply-to:references; q=dns; s= default; b=dNAwaV5SlnL9OK/AEgn4P/OcNrykQ5vIoNvtK5cHdUUiSGfWfZrTn FhxQU6/oc+JR4roAphL2WpxPANrpps1aeTru7Xgb/qKbyzG5WTqJKMcJRgmGgk6V k3AsRAoRa37L4i7NYmk/ZshOykXpbdT4hTNrKo8fQinCiSyd2R2d0Y= 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:date:message-id:in-reply-to:references; s=default; bh=elXjIlx9RNtOWiL4TjQqaLiasS8=; b=K2v+L36tr9XlUqB261op+oCvckny UIdPKMXtHe00QQk4EwAd4soZNZKsBvvoW3DoxMcwHVZ/d0/+cDREhar/t0tWLjiv CqI3eAr2NFXa0e/WN85oiTPlIBOMZqXXxhO7rgU0Nrg/7HzE74o4YNz689qu3Yy1 4PNImNlnH6Zr1Is= Received: (qmail 34420 invoked by alias); 14 Sep 2016 19:13:40 -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 34296 invoked by uid 89); 14 Sep 2016 19:13:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:2748 X-HELO: paperclip.tbsaunde.org Received: from tbsaunde.org (HELO paperclip.tbsaunde.org) (66.228.47.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 14 Sep 2016 19:13:32 +0000 Received: from keg.corp.tor1.mozilla.com (unknown [IPv6:2607:f0c8:8000:80e0:56ee:75ff:fe52:afb9]) by paperclip.tbsaunde.org (Postfix) with ESMTPSA id D3B71C19E for ; Wed, 14 Sep 2016 19:13:30 +0000 (UTC) From: tbsaunde+gcc@tbsaunde.org To: gcc-patches@gcc.gnu.org Subject: [PATCH 4/8] make next/prev nondebug_insn take rtx_insn * Date: Wed, 14 Sep 2016 15:21:22 -0400 Message-Id: <20160914192126.2287-5-tbsaunde+gcc@tbsaunde.org> In-Reply-To: <20160914192126.2287-1-tbsaunde+gcc@tbsaunde.org> References: <20160914192126.2287-1-tbsaunde+gcc@tbsaunde.org> X-IsSubscribed: yes From: Trevor Saunders gcc/ChangeLog: 2016-09-13 Trevor Saunders * emit-rtl.c (next_nondebug_insn): Change argument type to rtx_insn *. (prev_nondebug_insn): Likewise. * loop-doloop.c (doloop_condition_get): Likewise. * rtl.h: Adjust prototype. * cfgloop.h: Likewise. --- gcc/cfgloop.h | 2 +- gcc/emit-rtl.c | 8 ++------ gcc/loop-doloop.c | 2 +- gcc/rtl.h | 4 ++-- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h index 5c202eb..0448a61 100644 --- a/gcc/cfgloop.h +++ b/gcc/cfgloop.h @@ -371,7 +371,7 @@ extern bool just_once_each_iteration_p (const struct loop *, const_basic_block); gcov_type expected_loop_iterations_unbounded (const struct loop *, bool *read_profile_p = NULL); extern unsigned expected_loop_iterations (struct loop *); -extern rtx doloop_condition_get (rtx); +extern rtx doloop_condition_get (rtx_insn *); void mark_loop_for_removal (loop_p); diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index cbea214..6051326 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -3373,10 +3373,8 @@ prev_nonnote_insn_bb (rtx uncast_insn) routine does not look inside SEQUENCEs. */ rtx_insn * -next_nondebug_insn (rtx uncast_insn) +next_nondebug_insn (rtx_insn *insn) { - rtx_insn *insn = safe_as_a (uncast_insn); - while (insn) { insn = NEXT_INSN (insn); @@ -3391,10 +3389,8 @@ next_nondebug_insn (rtx uncast_insn) This routine does not look inside SEQUENCEs. */ rtx_insn * -prev_nondebug_insn (rtx uncast_insn) +prev_nondebug_insn (rtx_insn *insn) { - rtx_insn *insn = safe_as_a (uncast_insn); - while (insn) { insn = PREV_INSN (insn); diff --git a/gcc/loop-doloop.c b/gcc/loop-doloop.c index c311516..17a968f 100644 --- a/gcc/loop-doloop.c +++ b/gcc/loop-doloop.c @@ -70,7 +70,7 @@ along with GCC; see the file COPYING3. If not see if it is not a decrement and branch jump insn. */ rtx -doloop_condition_get (rtx doloop_pat) +doloop_condition_get (rtx_insn *doloop_pat) { rtx cmp; rtx inc; diff --git a/gcc/rtl.h b/gcc/rtl.h index 0d121bc..b557ffe 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -2838,8 +2838,8 @@ extern rtx_insn *prev_nonnote_insn (rtx_insn *); extern rtx_insn *prev_nonnote_insn_bb (rtx); extern rtx_insn *next_nonnote_insn (rtx_insn *); extern rtx_insn *next_nonnote_insn_bb (rtx_insn *); -extern rtx_insn *prev_nondebug_insn (rtx); -extern rtx_insn *next_nondebug_insn (rtx); +extern rtx_insn *prev_nondebug_insn (rtx_insn *); +extern rtx_insn *next_nondebug_insn (rtx_insn *); extern rtx_insn *prev_nonnote_nondebug_insn (rtx); extern rtx_insn *next_nonnote_nondebug_insn (rtx); extern rtx_insn *prev_real_insn (rtx);