From patchwork Wed Dec 11 19:04:28 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: 300289 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)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 2EEEB2C00AB for ; Thu, 12 Dec 2013 06:04:57 +1100 (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:date:message-id:content-type :content-transfer-encoding:mime-version; q=dns; s=default; b=nmg CRvtd6frTRsJM2ReHOBfmEyovP3gOH0aSVF6HrluouWMluf2uHrQiuVHu5A/Xfv3 q+v67u0Xx9T+uSdf4mFxJqFBbYQ8EbtD/D56uyANCfWBPMie4p5UBDREvl8r09fL 4A/HHqlfKO3vEpg7UqvIT6ImXBxLCuPL+yuB9DSQ= 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:content-type :content-transfer-encoding:mime-version; s=default; bh=zLAPH1B+B HJFYj2cUOALbLHapsA=; b=g8kkjAL8OfU6GXQCyRk68WPgRlM4nXvxSGiwquTxg y8sKLQLTl/tWI9m6b9W3+9LD7xOKPV1+GxSYRYKAgEZEbUEQwLEFbqJLZx3rvXDZ R9/3/b+C6EfRFLUuwLQmJ5syQ48F6m7roO0ZieW4QHWt+KChLZuXDmA3YRnvJeMH dk= Received: (qmail 7458 invoked by alias); 11 Dec 2013 19:04:51 -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 7448 invoked by uid 89); 11 Dec 2013 19:04:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.0 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mga02.intel.com Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 11 Dec 2013 19:04:49 +0000 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 11 Dec 2013 11:04:32 -0800 X-ExtLoop1: 1 Received: from fmsmsx104.amr.corp.intel.com ([10.19.9.35]) by orsmga002.jf.intel.com with ESMTP; 11 Dec 2013 11:04:30 -0800 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX104.amr.corp.intel.com (10.19.9.35) with Microsoft SMTP Server (TLS) id 14.3.123.3; Wed, 11 Dec 2013 11:04:29 -0800 Received: from fmsmsx101.amr.corp.intel.com ([169.254.1.227]) by FMSMSX113.amr.corp.intel.com ([169.254.4.24]) with mapi id 14.03.0123.003; Wed, 11 Dec 2013 11:04:29 -0800 From: "Iyer, Balaji V" To: "gcc-patches@gcc.gnu.org" CC: Jeff Law Subject: [PATCH] Enable Cilk keywords in Cilk Runtime Date: Wed, 11 Dec 2013 19:04:28 +0000 Message-ID: MIME-Version: 1.0 X-IsSubscribed: yes Hello Everyone, Since we have _Cilk_spawn and _Cilk_sync support in C++ compiler, we can enable the keyword usage in runtime. This patch should do so. Is it Ok to install? Here are the ChangeLog entries: 2013-12-11 Balaji V. Iyer * Makefile.am (GENERAL_FLAGS): Removed un-defining of Cilk keywords. * Makefile.in: Regenerate. * runtime/symbol_test.c: Added a #define to clear out _Cilk_for. Thanks, Balaji V. Iyer. Here is the patch. diff --git a/libcilkrts/Makefile.am b/libcilkrts/Makefile.am index 56bc9eb..d252087 100644 --- a/libcilkrts/Makefile.am +++ b/libcilkrts/Makefile.am @@ -38,7 +38,7 @@ ACLOCAL_AMFLAGS = -I .. -I ../config # Compiler and linker flags. GENERAL_FLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/runtime -I$(top_srcdir)/runtime/config/$(config_dir) -DIN_CILK_RUNTIME=1 -GENERAL_FLAGS += -D_Cilk_spawn="" -D_Cilk_sync="" -D_Cilk_for=for +# GENERAL_FLAGS += -D_Cilk_spawn="" -D_Cilk_sync="" -D_Cilk_for=for # Enable Intel Cilk Plus extension GENERAL_FLAGS += -fcilkplus diff --git a/libcilkrts/Makefile.in b/libcilkrts/Makefile.in index 5066bef..94902e1 100644 --- a/libcilkrts/Makefile.in +++ b/libcilkrts/Makefile.in @@ -342,12 +342,12 @@ AUTOMAKE_OPTIONS = foreign ACLOCAL_AMFLAGS = -I .. -I ../config # Compiler and linker flags. +# GENERAL_FLAGS += -D_Cilk_spawn="" -D_Cilk_sync="" -D_Cilk_for=for # Enable Intel Cilk Plus extension GENERAL_FLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/runtime \ -I$(top_srcdir)/runtime/config/$(config_dir) \ - -DIN_CILK_RUNTIME=1 -D_Cilk_spawn="" -D_Cilk_sync="" \ - -D_Cilk_for=for -fcilkplus + -DIN_CILK_RUNTIME=1 -fcilkplus AM_CFLAGS = $(GENERAL_FLAGS) -std=c99 AM_CPPFLAGS = $(GENERAL_FLAGS) AM_LDFLAGS = -lpthread diff --git a/libcilkrts/runtime/symbol_test.c b/libcilkrts/runtime/symbol_test.c index 1113ecd..8291d36 100644 --- a/libcilkrts/runtime/symbol_test.c +++ b/libcilkrts/runtime/symbol_test.c @@ -41,6 +41,7 @@ * will cause a linker error. */ +#define _Cilk_for for extern void* __cilkrts_global_state; void *volatile p;