From patchwork Thu Nov 6 10:06:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 407389 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 4B2CC140098 for ; Thu, 6 Nov 2014 21:06:20 +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:in-reply-to:references:date:message-id :mime-version:content-type; q=dns; s=default; b=W7ElywpVJX3u8dte vWO3XJy7me8gik8PkuL1A4aKCnvwaVH0ASSw/nBtQLBO3gZ5UoWc5/9t2Ht1iRHL 8YK+3dri1WqFmAym0rNdfm0gYj801fOrB02owVEU2zB69vcFJJRsM1mGs2ZYXVPx dvgL+U1wcZKD6U8ZDF+/Q6b6YEQ= 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:in-reply-to:references:date:message-id :mime-version:content-type; s=default; bh=z3Fld/aFipBdoR+dUXfKjP XMUmo=; b=WlF03rlUPLUcWRWwJIqcA0noPNZaH9FwOo1213GEyPV1wcTB233xTv Q9N9F6NTAL++e39PuU3j2VPHFPP0fGBZr7HKc1Wz78UhimckzlSd219r5xljtrpE RNLtA6rxGiLjIUgjQKfFK9xVXy4wH/46ToLu/1I6M9h+qlOWczvng= Received: (qmail 11259 invoked by alias); 6 Nov 2014 10:06:14 -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 11248 invoked by uid 89); 6 Nov 2014 10:06:12 -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, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 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; Thu, 06 Nov 2014 10:06:11 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XmJxA-0001Sy-3U from Thomas_Schwinge@mentor.com for gcc-patches@gcc.gnu.org; Thu, 06 Nov 2014 02:06:08 -0800 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.181.6; Thu, 6 Nov 2014 10:06:06 +0000 From: Thomas Schwinge To: "gcc-patches@gcc.gnu.org" CC: Cesar Philippidis Subject: Re: [gomp4] acc reductions with multiple variables In-Reply-To: <54541CBF.7000708@codesourcery.com> References: <54541CBF.7000708@codesourcery.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) Date: Thu, 6 Nov 2014 11:06:01 +0100 Message-ID: <87egtghcdy.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Hi! On Fri, 31 Oct 2014 16:35:27 -0700, Cesar Philippidis wrote: > This patch does the following: [...] > gcc/ > * omp-low.c (oacc_max_threads): New function. > (lower_reduction_clauses): Use the GOACC thread builtin functions to > determine the thread count. Handle multiple reduction variables. > (expand_omp_for_static_nochunk): Likewise. > (expand_omp_for_static_chunk): Likewise. > (finalize_reduction_data): General cleanups. > (process_reduction_data): Use acc_get_device_type to determine nthreads > at runtime. I fixed, conservatively, a bootstrap failure in gomp-4_branch's r217183: commit 7b80846629e7ed87bfd9efe42a7b49712b38c5a6 Author: tschwinge Date: Thu Nov 6 10:04:25 2014 +0000 Fix bootstrap failure. [...]/source-gcc/gcc/omp-low.c: In function 'void lower_reduction_clauses(tree, gimple_statement_base**, omp_context*)': [...]/source-gcc/gcc/omp-low.c:4611:70: error: 'tid' may be used uninitialized in this function [-Werror=maybe-uninitialized] lower_reduction_var_helper (stmt_seqp, ctx, tid, var, new_var); ^ cc1plus: all warnings being treated as errors make[3]: *** [omp-low.o] Error 1 make[3]: Leaving directory `[...]/build-gcc/gcc' make[2]: *** [all-stage2-gcc] Error 2 make[2]: Leaving directory `[...]/build-gcc' make[1]: *** [stage2-bubble] Error 2 make[1]: Leaving directory `[...]/build-gcc' make: *** [all] Error 2 gcc/ * omp-low.c (lower_reduction_clauses): Initialize tid. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@217183 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog.gomp | 4 ++++ gcc/omp-low.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) Grüße, Thomas diff --git gcc/ChangeLog.gomp gcc/ChangeLog.gomp index d140a35..0bc9080 100644 --- gcc/ChangeLog.gomp +++ gcc/ChangeLog.gomp @@ -1,3 +1,7 @@ +2014-11-06 Thomas Schwinge + + * omp-low.c (lower_reduction_clauses): Initialize tid. + 2014-11-05 Thomas Schwinge * tree-core.h (enum omp_clause_code): Remove OMP_CLAUSE_HOST and diff --git gcc/omp-low.c gcc/omp-low.c index 0b45e69..23d9f5a8 100644 --- gcc/omp-low.c +++ gcc/omp-low.c @@ -4530,7 +4530,7 @@ lower_reduction_clauses (tree clauses, gimple_seq *stmt_seqp, omp_context *ctx) { gimple_seq sub_seq = NULL; gimple stmt; - tree x, c, tid; + tree x, c, tid = NULL_TREE; int count = 0; /* SIMD reductions are handled in lower_rec_input_clauses. */