From patchwork Fri Sep 5 09:41:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 386224 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 E08591400D5 for ; Fri, 5 Sep 2014 19:41:55 +1000 (EST) 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=UVmrfoGnLJ5e41fm k2e4McV69axRJ3oQYcUn+m+1BlcfyUYRvPO4X9v8p23Hwle8+c2I4HpuuKjaAqFL QpYYtF01yUrT/7oI3A8SeIZNyHpHYKiUCS2g5YSyqpWR9DZENZDjorm8nZkZ1Kwh ni41JqS849b9EC0UvkOXaORmYO4= 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=8qUhU1a6vOoOttXb9KC52d wlIZI=; b=qGCRTSNZlQJdUx/JhZtHR+sALvjfw3AYcEvLz2xxfTqPS+YpbpT1Sy dyMiMnZ52nDhUM8aZjQ0GsbFdVN/i6KnV0bTtLx/wf5X/hdflZAMSUESlbJNYWoq CLmJFVWlmd9WnTFFwaVMD4i98OhMJPwpP+5sM02Hc/c1GSYsSxAac= Received: (qmail 24731 invoked by alias); 5 Sep 2014 09:41:30 -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 24721 invoked by uid 89); 5 Sep 2014 09:41:29 -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: 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; Fri, 05 Sep 2014 09:41:28 +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 1XPq1D-0000dZ-Hm from Thomas_Schwinge@mentor.com ; Fri, 05 Sep 2014 02:41:23 -0700 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.2.247.3; Fri, 5 Sep 2014 10:41:22 +0100 From: Thomas Schwinge To: "Zamyatin, Igor" , CC: "Jakub Jelinek (jakub@redhat.com)" , "GCC Patches (gcc-patches@gcc.gnu.org)" Subject: Re: [PATCH, Cilk+] CIlk_for enabling in the compiler In-Reply-To: <0EFAB2BDD0F67E4FB6CCC8B9F87D756969B22535@IRSMSX101.ger.corp.intel.com> References: <0EFAB2BDD0F67E4FB6CCC8B9F87D756969B22535@IRSMSX101.ger.corp.intel.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/23.4.1 (i486-pc-linux-gnu) Date: Fri, 5 Sep 2014 11:41:07 +0200 Message-ID: <87ppfa2ymk.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Hi! On Fri, 29 Aug 2014 14:36:17 +0000, "Zamyatin, Igor" wrote: > The patch is another attempt to enable Cilk_for (see eg https://www.cilkplus.org/sites/default/files/open_specifications/Intel_Cilk_plus_lang_spec_1.2.htm) in the GCC compiler. > > Bootstrapped and regtested on x86_64. > Is it ok for the trunk? (Committed as r214818.) One question: > --- a/gcc/gimplify.c > +++ b/gcc/gimplify.c > @@ -7056,6 +7058,7 @@ gimplify_omp_for (tree *expr_p, gimple_seq *pre_p) > case OMP_FOR: kind = GF_OMP_FOR_KIND_FOR; break; > case OMP_SIMD: kind = GF_OMP_FOR_KIND_SIMD; break; > case CILK_SIMD: kind = GF_OMP_FOR_KIND_CILKSIMD; break; > + case CILK_FOR: kind = GF_OMP_FOR_KIND_CILKFOR; break; > case OMP_DISTRIBUTE: kind = GF_OMP_FOR_KIND_DISTRIBUTE; break; > default: > gcc_unreachable (); > @@ -8128,6 +8131,7 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, > case OMP_FOR: > case OMP_SIMD: > case CILK_SIMD: > + case CILK_FOR: > case OMP_DISTRIBUTE: > ret = gimplify_omp_for (expr_p, pre_p); > break; > --- a/gcc/tree.def > +++ b/gcc/tree.def > @@ -1064,6 +1064,10 @@ DEFTREECODE (OMP_SIMD, "omp_simd", tcc_statement, 6) > Operands like for OMP_FOR. */ > DEFTREECODE (CILK_SIMD, "cilk_simd", tcc_statement, 6) > > +/* Cilk Plus - _Cilk_for (..) > + Operands like for OMP_FOR. */ > +DEFTREECODE (CILK_FOR, "cilk_for", tcc_statement, 6) > + > /* OpenMP - #pragma omp distribute [clause1 ... clauseN] > Operands like for OMP_FOR. */ > DEFTREECODE (OMP_DISTRIBUTE, "omp_distribute", tcc_statement, 6) Shouldn't CILK_FOR also be added to gcc/gimplify.c:is_gimple_stmt, next to all the other OMP_FOR variants? Grüße, Thomas diff --git gcc/gimplify.c gcc/gimplify.c index 2319fc3..a621824 100644 --- gcc/gimplify.c +++ gcc/gimplify.c @@ -4426,6 +4426,7 @@ is_gimple_stmt (tree t) case OMP_FOR: case OMP_SIMD: case CILK_SIMD: + case CILK_FOR: case OMP_DISTRIBUTE: case OACC_LOOP: case OMP_SECTIONS: