From patchwork Sun Nov 8 15:39:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 541459 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 9BF131402D9 for ; Mon, 9 Nov 2015 02:39:59 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Ir8xq4Zi; 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:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=Et4xMjDegXKwN2Jun9nu31Bx41to4Wn5IKZYOAqkTWvmkgdWaV xkVVC0IYw0v15uu394orL8mkwkgxaz7wjs73ib+Xa8NN3hWGfMudO+wj3EYYjxp5 MEeRPjslk/0+WSJ4++DCAsLHw/Sv9B3g9W9dRtkplr5iNHHc8eBvN2+Co= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=hQqpoTApGD0McAxG89V0XVy3I7w=; b=Ir8xq4ZiXltEIGHnVRzN 3+5tUE7yu+1V3hhuPAxLP085q30SPAYUO5J3CjhI9oWIkpI5N//snjD0XfBusu3C 1EpNgHNBn7XBxU3S7FCiuaHQlwRF22z/X4PQMDMOrexoOtPIEbgzO1ArxWLs7ngn aDzTol4Mph/xMxuJ5PVNsuk= Received: (qmail 129001 invoked by alias); 8 Nov 2015 15:39:52 -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 128987 invoked by uid 89); 8 Nov 2015 15:39:51 -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, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: fencepost.gnu.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (208.118.235.10) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sun, 08 Nov 2015 15:39:50 +0000 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35597) by fencepost.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ZvS4J-0004yq-Sc for gcc-patches@gnu.org; Sun, 08 Nov 2015 10:39:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZvS4G-0004lj-9V for gcc-patches@gnu.org; Sun, 08 Nov 2015 10:39:47 -0500 Received: from relay1.mentorg.com ([192.94.38.131]:62096) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvS4G-0004kl-3S for gcc-patches@gnu.org; Sun, 08 Nov 2015 10:39:44 -0500 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-02.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1ZvS4D-0002RK-KR from Tom_deVries@mentor.com ; Sun, 08 Nov 2015 07:39:41 -0800 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-02.mgc.mentorg.com (137.202.0.106) with Microsoft SMTP Server id 14.3.224.2; Sun, 8 Nov 2015 15:39:40 +0000 To: "gcc-patches@gnu.org" , Jakub Jelinek From: Tom de Vries Subject: [gomp4, committed] Simplify get_omp_data_i_param Message-ID: <563F6CA7.9040101@mentor.com> Date: Sun, 8 Nov 2015 16:39:19 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] [fuzzy] X-Received-From: 192.94.38.131 Hi, this patch simplifies get_omp_data_i_param by using ssa_default_def. Committed to gomp-4_0-branch. Thanks, - Tom Simplify get_omp_data_i_param 2015-11-08 Tom de Vries * tree-parloops.c: Include tree-dfa.h. (get_omp_data_i_param): Simplify using ssa_default_def. --- gcc/tree-parloops.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c index b4039ad..1551eec 100644 --- a/gcc/tree-parloops.c +++ b/gcc/tree-parloops.c @@ -55,6 +55,7 @@ along with GCC; see the file COPYING3. If not see #include "params-enum.h" #include "tree-ssa-alias.h" #include "tree-eh.h" +#include "tree-dfa.h" /* This pass tries to distribute iterations of loops into several threads. The implementation is straightforward -- for each loop we test whether its @@ -2607,15 +2608,7 @@ get_omp_data_i_param (void) { tree decl = DECL_ARGUMENTS (cfun->decl); gcc_assert (DECL_CHAIN (decl) == NULL_TREE); - for (unsigned int i = 0; i < num_ssa_names; ++i) - { - tree name = ssa_name (i); - if (name != NULL_TREE - && SSA_NAME_VAR (name) == decl) - return name; - } - - gcc_unreachable (); + return ssa_default_def (cfun, decl); } /* Try to initialize REDUCTION_LIST for code generation part. -- 1.9.1