From patchwork Mon May 20 19:34:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Iyer, Balaji V" X-Patchwork-Id: 245096 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 7026E2C00D2 for ; Tue, 21 May 2013 05:34:54 +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:subject:date:message-id:references:in-reply-to:content-type :mime-version; q=dns; s=default; b=tYu5TifedEq8F4UC4Z9APB1O6wYJ4 7Wbu0eyy0AQmXDTg+VhWVDTy4NWN2w4Hnndix95CaJdR0Oqp/wJjn0RTyr3v0jsf PvwzqCwsRIArky186gnJQLSsdnTZMx/V5SIu9zAJ1RFci/RLD3QTD0P4fg7bOROo ExuUKy9gw4hLtM= 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:references:in-reply-to:content-type :mime-version; s=default; bh=bp9mtNsyAF7X+qHFT3bztBYjBh0=; b=fMw mZ8sZ0OAJvO3TkRWh+pQVHmSU/RWaj2cRBsuok+uid/Whr+m4KPQmRUfhKBR7+C6 4wnF/Rf0CCQG5qCBXeC4I/QjchNYbbLNjfZDpsbnAbE8VO5HsBUGC6+oLVeHlkCv JyqXyIkoESZcUiAUQneW7Qek25G5sbyJ/6lIbG0Y= Received: (qmail 26075 invoked by alias); 20 May 2013 19:34:47 -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 26063 invoked by uid 89); 20 May 2013 19:34:47 -0000 X-Spam-SWARE-Status: No, score=-7.8 required=5.0 tests=AWL, BAYES_00, KHOP_THREADED, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.1 Received: from mga11.intel.com (HELO mga11.intel.com) (192.55.52.93) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 20 May 2013 19:34:46 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 20 May 2013 12:34:49 -0700 X-ExtLoop1: 1 Received: from fmsmsx105.amr.corp.intel.com ([10.19.9.36]) by fmsmga002.fm.intel.com with ESMTP; 20 May 2013 12:34:45 -0700 Received: from fmsmsx101.amr.corp.intel.com ([169.254.1.135]) by FMSMSX105.amr.corp.intel.com ([169.254.5.186]) with mapi id 14.03.0123.003; Mon, 20 May 2013 12:34:45 -0700 From: "Iyer, Balaji V" To: Aldy Hernandez , gcc-patches , Jakub Jelinek Subject: RE: [gomp4/cilkplus] C parsing for Cilk Plus <#pragma simd> Date: Mon, 20 May 2013 19:34:44 +0000 Message-ID: References: <5191825E.5060307@redhat.com> In-Reply-To: <5191825E.5060307@redhat.com> MIME-Version: 1.0 X-Virus-Found: No Hello Aldy, I have moved a couple prototypes from c-tree.h to c-family/c-common.h. This way I can use the same function for the C++ implementation. Here is a patch. Thanks, Balaji V. Iyer. > -----Original Message----- > From: Aldy Hernandez [mailto:aldyh@redhat.com] > Sent: Monday, May 13, 2013 8:17 PM > To: gcc-patches; Jakub Jelinek > Cc: Iyer, Balaji V > Subject: [gomp4/cilkplus] C parsing for Cilk Plus <#pragma simd> > > Hi Jakub. Hi folks. > > Attached is a patch against the gomp4 branch implementing Cilk's <#pragma > simd> construct with the gomp4 infrastructure. I emit OMP_SIMD as previously > mentioned, and let omp-low.c do the rest. > > The reason for this, is that Cilk Plus and OMP4 behave pretty much the same > way, so there's no need to implement differing trees. If in the future they > diverge too much, I guess we could add different tree family opcodes for Cilk > Plus and gimplify them to a common representation. For now, they're pretty > much identical. > > I am working on a private branch in aldyh/cilk-in-gomp, but I thought I'd post > what I've done so far, since it's pretty much complete, and Balaji is about to > start the C++ parsing bits based on this work. > > Let me know if you see anything obviously wrong, or would like things in any > way different. > > Aldy diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h index 78ace77..c96c6f1 100644 --- a/gcc/c-family/c-common.h +++ b/gcc/c-family/c-common.h @@ -521,6 +521,11 @@ struct GTY(()) c_language_function { #define building_stmt_list_p() (stmt_list_stack && !stmt_list_stack->is_empty()) +/* In c-cilkplus.c */ +extern tree c_finish_cilk_simd_loop (location_t, tree, tree, tree, tree, + tree, tree); +extern tree c_finish_cilk_clauses (tree); + /* Language-specific hooks. */ /* If non-NULL, this function is called after a precompile header file diff --git a/gcc/c/c-tree.h b/gcc/c/c-tree.h index 84471db..356bd6c 100644 --- a/gcc/c/c-tree.h +++ b/gcc/c/c-tree.h @@ -647,10 +647,6 @@ extern tree c_build_va_arg (location_t, tree, tree); extern tree c_finish_transaction (location_t, tree, int); extern bool c_tree_equal (tree, tree); -/* In c-cilkplus.c */ -extern tree c_finish_cilk_simd_loop (location_t, tree, tree, tree, tree, - tree, tree); -extern tree c_finish_cilk_clauses (tree); /* Set to 0 at beginning of a function definition, set to 1 if a return statement that specifies a return value is seen. */