diff mbox

[2/3] Correct indentation.

Message ID 1297657022-27675-3-git-send-email-sebpop@gmail.com
State New
Headers show

Commit Message

Sebastian Pop Feb. 14, 2011, 4:17 a.m. UTC
2011-02-12  Sebastian Pop  <sebastian.pop@amd.com>

	* tree-parloops.c (parallelize_loops): Correct indentation.
---
 gcc/ChangeLog       |    4 ++
 gcc/tree-parloops.c |   78 +++++++++++++++++++++++++-------------------------
 2 files changed, 43 insertions(+), 39 deletions(-)
diff mbox

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 52523ac..d3cc10f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@ 
 2011-02-12  Sebastian Pop  <sebastian.pop@amd.com>
 
+	* tree-parloops.c (parallelize_loops): Correct indentation.
+
+2011-02-12  Sebastian Pop  <sebastian.pop@amd.com>
+
 	* tree-parloops.c (gen_parallel_loop): Remove redundant call to
 	force_gimple_operand.
 
diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c
index 19dff68..f44442a 100644
--- a/gcc/tree-parloops.c
+++ b/gcc/tree-parloops.c
@@ -2079,45 +2079,42 @@  parallelize_loops (void)
   LOC loop_loc;
 
   /* Do not parallelize loops in the functions created by parallelization.  */
-  if (parallelized_function_p (cfun->decl))
-    return false;
-  if (cfun->has_nonlocal_label)
+  if (parallelized_function_p (cfun->decl)
+      || cfun->has_nonlocal_label)
     return false;
 
   gcc_obstack_init (&parloop_obstack);
   reduction_list = htab_create (10, reduction_info_hash,
-				     reduction_info_eq, free);
+				reduction_info_eq, free);
   init_stmt_vec_info_vec ();
 
   FOR_EACH_LOOP (li, loop, 0)
     {
       htab_empty (reduction_list);
       if (dump_file && (dump_flags & TDF_DETAILS))
-      {
-        fprintf (dump_file, "Trying loop %d as candidate\n",loop->num);
-	if (loop->inner)
-	  fprintf (dump_file, "loop %d is not innermost\n",loop->num);
-	else
-	  fprintf (dump_file, "loop %d is innermost\n",loop->num);
-      }
+	{
+	  fprintf (dump_file, "Trying loop %d as candidate\n",loop->num);
+	  if (loop->inner)
+	    fprintf (dump_file, "loop %d is not innermost\n",loop->num);
+	  else
+	    fprintf (dump_file, "loop %d is innermost\n",loop->num);
+	}
 
       /* If we use autopar in graphite pass, we use its marked dependency
-      checking results.  */
+	 checking results.  */
       if (flag_loop_parallelize_all && !loop->can_be_parallel)
-      {
-        if (dump_file && (dump_flags & TDF_DETAILS))
-	   fprintf (dump_file, "loop is not parallel according to graphite\n");
-	continue;
-      }
+	{
+	  if (dump_file && (dump_flags & TDF_DETAILS))
+	    fprintf (dump_file, "loop is not parallel according to graphite\n");
+	  continue;
+	}
 
       if (!single_dom_exit (loop))
-      {
-
-        if (dump_file && (dump_flags & TDF_DETAILS))
-	  fprintf (dump_file, "loop is !single_dom_exit\n");
-
-	continue;
-      }
+	{
+	  if (dump_file && (dump_flags & TDF_DETAILS))
+	    fprintf (dump_file, "loop is !single_dom_exit\n");
+	  continue;
+	}
 
       if (/* And of course, the loop must be parallelizable.  */
 	  !can_duplicate_loop_p (loop)
@@ -2126,12 +2123,13 @@  parallelize_loops (void)
 	  /* FIXME: the check for vector phi nodes could be removed.  */
 	  || loop_has_vector_phi_nodes (loop))
 	continue;
+
       estimated = estimated_loop_iterations_int (loop, false);
       /* FIXME: Bypass this check as graphite doesn't update the
-      count and frequency correctly now.  */
+	 count and frequency correctly now.  */
       if (!flag_loop_parallelize_all
-	  && ((estimated !=-1 
-	     && estimated <= (HOST_WIDE_INT) n_threads * MIN_PER_THREAD)
+	  && ((estimated != -1
+	       && estimated <= (HOST_WIDE_INT) n_threads * MIN_PER_THREAD)
 	      /* Do not bother with loops in cold areas.  */
 	      || optimize_loop_nest_for_size_p (loop)))
 	continue;
@@ -2148,18 +2146,20 @@  parallelize_loops (void)
 
       changed = true;
       if (dump_file && (dump_flags & TDF_DETAILS))
-      {
-	if (loop->inner)
-	  fprintf (dump_file, "parallelizing outer loop %d\n",loop->header->index);
-	else
-	  fprintf (dump_file, "parallelizing inner loop %d\n",loop->header->index);
-	loop_loc = find_loop_location (loop);
-	if (loop_loc != UNKNOWN_LOC)
-	  fprintf (dump_file, "\nloop at %s:%d: ",
-		   LOC_FILE (loop_loc), LOC_LINE (loop_loc));
-      }
-      gen_parallel_loop (loop, reduction_list,
-			 n_threads, &niter_desc);
+	{
+	  if (loop->inner)
+	    fprintf (dump_file, "parallelizing outer loop %d\n",
+		     loop->header->index);
+	  else
+	    fprintf (dump_file, "parallelizing inner loop %d\n",
+		     loop->header->index);
+	  loop_loc = find_loop_location (loop);
+	  if (loop_loc != UNKNOWN_LOC)
+	    fprintf (dump_file, "\nloop at %s:%d: ",
+		     LOC_FILE (loop_loc), LOC_LINE (loop_loc));
+	}
+
+      gen_parallel_loop (loop, reduction_list, n_threads, &niter_desc);
       verify_flow_info ();
       verify_dominators (CDI_DOMINATORS);
       verify_loop_structure ();