From patchwork Mon Oct 27 20:40:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 403952 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 EB68014007F for ; Tue, 28 Oct 2014 07:58:29 +1100 (AEDT) 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:cc:subject:date:message-id:in-reply-to:references; q=dns; s= default; b=R+fJKBwLoMLnBZCMIDKNVcrnwGLqfNlNL99VsIjR3jy3GWzA82xCj Suofu0HJpdz2tE1+ndCmkZRLE2fUxTHO/7nor5i1uYJdomnsW/s19huVanVsbBdA EbbZoVOtmw99S1GSE1l7zruOsa12oJDH+tKsl/G3ItacoU+HklAAoI= 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:cc:subject:date:message-id:in-reply-to:references; s= default; bh=Se3fEy/Ooye5GQsGNOgPUMwp9V4=; b=vsJMm5pKGkBT2OqVfkuq KZ6Y58HubctLgKYHLRTABGpFCpHY8EjmnD1Tbwp5YuwA4XtYMJeXhFZXdviwQmmq 99NpA4Zx9tjLZNSbo64M3PjEWzqXLQ0n4BxuPytcVXIka4XUiw7JNVSCdZQ+wBAs 38mcQXTsHuPbWKYy0d0drWk= Received: (qmail 23657 invoked by alias); 27 Oct 2014 20:54:42 -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 23591 invoked by uid 89); 27 Oct 2014 20:54:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Mon, 27 Oct 2014 20:54:40 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xir0J-0007Uy-Pr for gcc-patches@gcc.gnu.org; Mon, 27 Oct 2014 16:35:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34381) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xir0J-0007U5-JO for gcc-patches@gcc.gnu.org; Mon, 27 Oct 2014 16:35:03 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9RKZ3OJ032566 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 27 Oct 2014 16:35:03 -0400 Received: from c64.redhat.com (vpn-236-51.phx2.redhat.com [10.3.236.51]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s9RKYt4t021050; Mon, 27 Oct 2014 16:35:02 -0400 From: David Malcolm To: gcc-patches@gcc.gnu.org Cc: David Malcolm Subject: [gimple-classes, committed 11/92] tree-predcom.c: use gimple_phi in various places Date: Mon, 27 Oct 2014 16:40:09 -0400 Message-Id: <1414442490-14841-12-git-send-email-dmalcolm@redhat.com> In-Reply-To: <1414442490-14841-1-git-send-email-dmalcolm@redhat.com> References: <1414442490-14841-1-git-send-email-dmalcolm@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 X-IsSubscribed: yes This corresponds to: [PATCH 12/89] tree-predcom.c: use gimple_phi in various places https://gcc.gnu.org/ml/gcc-patches/2014-04/msg01229.html from the original 89-patch kit That earlier patch was approved by Jeff: > OK when prerequisites have gone in. in https://gcc.gnu.org/ml/gcc-patches/2014-05/msg00621.html gcc/ * tree-predcom.c (find_looparound_phi): Return a gimple_phi rather than just a gimple. (insert_looparound_copy): Require a gimple_phi rather than just a gimple. (add_looparound_copies): Convert local "phi" to be a gimple_phi. (initialize_root_vars): Likewise. (initialize_root_vars_lm): Likewise. --- gcc/ChangeLog.gimple-classes | 12 ++++++++++++ gcc/tree-predcom.c | 10 +++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog.gimple-classes b/gcc/ChangeLog.gimple-classes index fb4c222..0e6a5d9 100644 --- a/gcc/ChangeLog.gimple-classes +++ b/gcc/ChangeLog.gimple-classes @@ -1,5 +1,17 @@ 2014-10-24 David Malcolm + tree-predcom.c: use gimple_phi in various places + + * tree-predcom.c (find_looparound_phi): Return a gimple_phi rather + than just a gimple. + (insert_looparound_copy): Require a gimple_phi rather than just a + gimple. + (add_looparound_copies): Convert local "phi" to be a gimple_phi. + (initialize_root_vars): Likewise. + (initialize_root_vars_lm): Likewise. + +2014-10-24 David Malcolm + tree-parloops.c: use gimple_phi in various places * tree-parloops.c (struct reduction_info): Strengthen field "new_phi" diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c index 0ce81aa..dfda10e 100644 --- a/gcc/tree-predcom.c +++ b/gcc/tree-predcom.c @@ -1112,7 +1112,7 @@ valid_initializer_p (struct data_reference *ref, iteration), returns the phi node. Otherwise, NULL_TREE is returned. ROOT is the root of the current chain. */ -static gimple +static gimple_phi find_looparound_phi (struct loop *loop, dref ref, dref root) { tree name, init, init_ref; @@ -1174,7 +1174,7 @@ find_looparound_phi (struct loop *loop, dref ref, dref root) /* Adds a reference for the looparound copy of REF in PHI to CHAIN. */ static void -insert_looparound_copy (chain_p chain, dref ref, gimple phi) +insert_looparound_copy (chain_p chain, dref ref, gimple_phi phi) { dref nw = XCNEW (struct dref_d), aref; unsigned i; @@ -1205,7 +1205,7 @@ add_looparound_copies (struct loop *loop, chain_p chain) { unsigned i; dref ref, root = get_chain_root (chain); - gimple phi; + gimple_phi phi; FOR_EACH_VEC_ELT (chain->refs, i, ref) { @@ -1457,7 +1457,7 @@ initialize_root_vars (struct loop *loop, chain_p chain, bitmap tmp_vars) dref root = get_chain_root (chain); bool reuse_first = !chain->has_max_use_after; tree ref, init, var, next; - gimple phi; + gimple_phi phi; gimple_seq stmts; edge entry = loop_preheader_edge (loop), latch = loop_latch_edge (loop); @@ -1531,7 +1531,7 @@ initialize_root_vars_lm (struct loop *loop, dref root, bool written, unsigned i; tree ref = DR_REF (root->ref), init, var, next; gimple_seq stmts; - gimple phi; + gimple_phi phi; edge entry = loop_preheader_edge (loop), latch = loop_latch_edge (loop); /* Find the initializer for the variable, and check that it cannot