diff mbox

[Cilkplus] Fix a small cilk_for bug

Message ID BF230D13CA30DD48930C31D4099330000F290D53@FMSMSX102.amr.corp.intel.com
State New
Headers show

Commit Message

Iyer, Balaji V July 4, 2012, 5:06 a.m. UTC
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.
diff mbox

Patch

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  <balaji.v.iyer@intel.com>
+
+	* cp-gimplify.c (genericize_cp_loop): Removed adding the reset stmt.
+
 2012-06-26  Balaji V. Iyer  <balaji.v.iyer@intel.com>
 
 	* 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  <balaji.v.iyer@intel.com>
+
+	* 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  <balaji.v.iyer@intel.com>
 
 	* tree-vect-stmts.c (vectorizable_call): No need to bail out. Some