From patchwork Wed Jul 4 05:06:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Iyer, Balaji V" X-Patchwork-Id: 168889 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]) by ozlabs.org (Postfix) with SMTP id D916A2C0084 for ; Wed, 4 Jul 2012 15:06:59 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1341983221; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:From:To:Subject:Date:Message-ID:Content-Type: MIME-Version:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=IS2rEO/ Ye5u4GVUucCvibZ79i2w=; b=Tn0F9C0vtYhw5Q3mEj1rw0x2x/HK/4i1lRN5BHP xvIVMu856w/CMd95ZOAvsQutBZtMy/BH0bLiU1XTyhyv0w3Qk04bhH8n2s/9aOWy FikEtyLj+k7W7HhelS7IAKCTTUDzabu6F2hMIglH6Cak/6Gdz+cGvwkD4poqbO9T rZKo= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-ExtLoop1:Received:Received:Received:From:To:Subject:Date:Message-ID:Content-Type:MIME-Version:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=jN5jNUf8m7qfmnw2NhzyRkSnxzVTgMTBi+TFPjPS3Qt0C7wx3uTfBvh4Pv8pzO wakAbfmyqqvt2AA7QsjWItnfXvhXconzztqoDyTrkXooPEL7lB4uf/TXnV3oICXw ghZT5BwELpXK5YOKLOYOOtzcAFoyOjbGmfvVBjasNcrlc=; Received: (qmail 779 invoked by alias); 4 Jul 2012 05:06:54 -0000 Received: (qmail 766 invoked by uid 22791); 4 Jul 2012 05:06:52 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, TW_TM, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga11.intel.com (HELO mga11.intel.com) (192.55.52.93) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 04 Jul 2012 05:06:28 +0000 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 03 Jul 2012 22:06:28 -0700 X-ExtLoop1: 1 Received: from fmsmsx106.amr.corp.intel.com ([10.19.9.37]) by fmsmga001.fm.intel.com with ESMTP; 03 Jul 2012 22:06:28 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.19.9.52) by FMSMSX106.amr.corp.intel.com (10.19.9.37) with Microsoft SMTP Server (TLS) id 14.1.355.2; Tue, 3 Jul 2012 22:06:27 -0700 Received: from fmsmsx102.amr.corp.intel.com ([169.254.2.65]) by FMSMSX101.amr.corp.intel.com ([169.254.1.78]) with mapi id 14.01.0355.002; Tue, 3 Jul 2012 22:06:27 -0700 From: "Iyer, Balaji V" To: "gcc-patches@gcc.gnu.org" Subject: [PATCH][Cilkplus] Fix a small cilk_for bug Date: Wed, 4 Jul 2012 05:06:27 +0000 Message-ID: MIME-Version: 1.0 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 Hello Everyone, This patch is for the Cilk Plus branch affecting both C and C++ compilers. This patch will fix a small cilk for bug and a small bug in pragma simd. Thanks, Balaji V. Iyer. Index: gcc/cgraphunit.c =================================================================== --- gcc/cgraphunit.c (revision 189029) +++ gcc/cgraphunit.c (working copy) @@ -452,7 +452,7 @@ if (warn_unused_parameter) do_warn_unused_parameter (decl); - if (!nested) + if (!nested && !flag_enable_cilk) ggc_collect (); if (cgraph_state == CGRAPH_STATE_CONSTRUCTION Index: gcc/cp/cp-gimplify.c =================================================================== --- gcc/cp/cp-gimplify.c (revision 189029) +++ gcc/cp/cp-gimplify.c (working copy) @@ -276,7 +276,6 @@ append_to_statement_list (entry, &stmt_list); append_to_statement_list (exit, &stmt_list); finish_bc_block (&stmt_list, bc_break, blab); - append_to_statement_list (reset_stmt_list, &stmt_list); if (stmt_list == NULL_TREE) stmt_list = build1 (NOP_EXPR, void_type_node, integer_zero_node); Index: gcc/cp/ChangeLog.cilk =================================================================== --- gcc/cp/ChangeLog.cilk (revision 189029) +++ gcc/cp/ChangeLog.cilk (working copy) @@ -1,3 +1,7 @@ +2012-07-03 Balaji V. Iyer + + * cp-gimplify.c (genericize_cp_loop): Removed adding the reset stmt. + 2012-06-26 Balaji V. Iyer * parser.c (cp_parser_pragma): Fixed a bug by calling linear instead of Index: gcc/cilk-spawn.c =================================================================== --- gcc/cilk-spawn.c (revision 189029) +++ gcc/cilk-spawn.c (working copy) @@ -2286,7 +2286,7 @@ compute_loop_var (struct cilk_for_desc *cfd, tree loop_var, tree lower_bound) { tree incr = cfd->incr; - tree count_type = cfd->count_type; + tree count_type = TREE_TYPE (loop_var); tree scaled, adjusted; int incr_sign = cfd->incr_sign; enum tree_code add_op = incr_sign >= 0 ? PLUS_EXPR : MINUS_EXPR; Index: gcc/ChangeLog.cilk =================================================================== --- gcc/ChangeLog.cilk (revision 189029) +++ gcc/ChangeLog.cilk (working copy) @@ -1,3 +1,10 @@ +2012-07-03 Balaji V. Iyer + + * cilk-spawn.c (compute_loop_var): Changed count_type from the struct + value to the type of the loop variable. + * cgraphunit.c (cgraph_finalize_function): Added a check for cilk flag + not being enabled. + 2012-06-27 Balaji V. Iyer * tree-vect-stmts.c (vectorizable_call): No need to bail out. Some