diff mbox

formatting cleanups

Message ID 5a0f7461-54fb-713b-a787-99b2ad310e2f@acm.org
State New
Headers show

Commit Message

Nathan Sidwell Nov. 22, 2016, 6:45 p.m. UTC
I noticed some wonky formatting.  Fixed as obvious.

nathan
-- 
Nathan Sidwell

Comments

Jakub Jelinek Nov. 22, 2016, 6:48 p.m. UTC | #1
On Tue, Nov 22, 2016 at 01:45:07PM -0500, Nathan Sidwell wrote:
> -	    tree ii_tree = array_exprs[ii][jj];

> -	    (*node)[ii][jj].is_vector = true;

> -	    (*node)[ii][jj].value = ARRAY_NOTATION_ARRAY (ii_tree);

> -	    (*node)[ii][jj].start = ARRAY_NOTATION_START (ii_tree);

> -	    (*node)[ii][jj].length =

> -	      fold_build1 (CONVERT_EXPR, integer_type_node,

> -			   ARRAY_NOTATION_LENGTH (ii_tree));

> -	    (*node)[ii][jj].stride =

> -	      fold_build1 (CONVERT_EXPR, integer_type_node,

> -			   ARRAY_NOTATION_STRIDE (ii_tree));

> -	  }

> +  for (size_t ii = 0; ii < size; ii++)

> +    if (TREE_CODE ((*list)[ii]) == ARRAY_NOTATION_REF)

> +      for (size_t jj = 0; jj < rank; jj++)

> +	{

> +	  tree ii_tree = array_exprs[ii][jj];

> +	  (*node)[ii][jj].is_vector = true;

> +	  (*node)[ii][jj].value = ARRAY_NOTATION_ARRAY (ii_tree);

> +	  (*node)[ii][jj].start = ARRAY_NOTATION_START (ii_tree);

> +	  (*node)[ii][jj].length =

> +	    fold_build1 (CONVERT_EXPR, integer_type_node,

> +			 ARRAY_NOTATION_LENGTH (ii_tree));

> +	  (*node)[ii][jj].stride =

> +	    fold_build1 (CONVERT_EXPR, integer_type_node,

> +			 ARRAY_NOTATION_STRIDE (ii_tree));


When you are already changing this, the = should be on the next line.

	Jakub
diff mbox

Patch

2016-11-22  Nathan Sidwell  <nathan@acm.org>

	gcc/
	* gcc-ar.c (main): Fix indentation.
	* gcov-io.c (gcov_write_summary): Remove extraneous {...}
	* ggc-page.c (move_ptes_to_front): Fix formatting.
	* hsa-dump.c (dump_has_cfun): Fix indentation.
	* sel-sched-ir.h: Remove trailing blank lines.

	gcc/c-family/
	* array-notation-common.c (cilkplus_extrat_an_triplets): Fix
	indentation.

Index: gcc-ar.c
===================================================================
--- gcc-ar.c	(revision 242695)
+++ gcc-ar.c	(working copy)
@@ -162,7 +162,7 @@  main (int ac, char **av)
 
 	  len = strlen (arg);
 	  if (len > 0)
-		  len--;
+	    len--;
 	  end = arg + len;
 
 	  /* Always add a dir separator for the prefix list.  */
Index: gcov-io.c
===================================================================
--- gcov-io.c	(revision 242695)
+++ gcov-io.c	(working copy)
@@ -421,13 +421,11 @@  gcov_write_summary (gcov_unsigned_t tag,
     histo_bitvector[bv_ix] = 0;
   csum = &summary->ctrs[GCOV_COUNTER_ARCS];
   for (h_ix = 0; h_ix < GCOV_HISTOGRAM_SIZE; h_ix++)
-    {
-      if (csum->histogram[h_ix].num_counters > 0)
-        {
-          histo_bitvector[h_ix / 32] |= 1 << (h_ix % 32);
-          h_cnt++;
-        }
-    }
+    if (csum->histogram[h_ix].num_counters)
+      {
+	histo_bitvector[h_ix / 32] |= 1 << (h_ix % 32);
+	h_cnt++;
+      }
   gcov_write_tag_length (tag, GCOV_TAG_SUMMARY_LENGTH (h_cnt));
   gcov_write_unsigned (summary->checksum);
   for (csum = summary->ctrs, ix = GCOV_COUNTERS_SUMMABLE; ix--; csum++)
Index: hsa-dump.c
===================================================================
--- hsa-dump.c	(revision 242695)
+++ hsa-dump.c	(working copy)
@@ -1130,10 +1130,10 @@  dump_hsa_cfun (FILE *f)
     }
 
   FOR_ALL_BB_FN (bb, cfun)
-  {
-    hsa_bb *hbb = (struct hsa_bb *) bb->aux;
-    dump_hsa_bb (f, hbb);
-  }
+    {
+      hsa_bb *hbb = (struct hsa_bb *) bb->aux;
+      dump_hsa_bb (f, hbb);
+    }
 }
 
 /* Dump textual representation of HSA IL instruction INSN to stderr.  */
Index: sel-sched-ir.h
===================================================================
--- sel-sched-ir.h	(revision 242695)
+++ sel-sched-ir.h	(working copy)
@@ -1669,11 +1669,3 @@  extern void alloc_sched_pools (void);
 extern void free_sched_pools (void);
 
 #endif /* GCC_SEL_SCHED_IR_H */
-
-
-
-
-
-
-
-
Index: c-family/array-notation-common.c
===================================================================
--- c-family/array-notation-common.c	(revision 242695)
+++ c-family/array-notation-common.c	(working copy)
@@ -621,21 +621,21 @@  cilkplus_extract_an_triplets (vec<tree,
 	    break;
 	}
     }
-    for (size_t ii = 0; ii < size; ii++)
-      if (TREE_CODE ((*list)[ii]) == ARRAY_NOTATION_REF)
-	for (size_t jj = 0; jj < rank; jj++)
-	  {
-	    tree ii_tree = array_exprs[ii][jj];
-	    (*node)[ii][jj].is_vector = true;
-	    (*node)[ii][jj].value = ARRAY_NOTATION_ARRAY (ii_tree);
-	    (*node)[ii][jj].start = ARRAY_NOTATION_START (ii_tree);
-	    (*node)[ii][jj].length =
-	      fold_build1 (CONVERT_EXPR, integer_type_node,
-			   ARRAY_NOTATION_LENGTH (ii_tree));
-	    (*node)[ii][jj].stride =
-	      fold_build1 (CONVERT_EXPR, integer_type_node,
-			   ARRAY_NOTATION_STRIDE (ii_tree));
-	  }
+  for (size_t ii = 0; ii < size; ii++)
+    if (TREE_CODE ((*list)[ii]) == ARRAY_NOTATION_REF)
+      for (size_t jj = 0; jj < rank; jj++)
+	{
+	  tree ii_tree = array_exprs[ii][jj];
+	  (*node)[ii][jj].is_vector = true;
+	  (*node)[ii][jj].value = ARRAY_NOTATION_ARRAY (ii_tree);
+	  (*node)[ii][jj].start = ARRAY_NOTATION_START (ii_tree);
+	  (*node)[ii][jj].length =
+	    fold_build1 (CONVERT_EXPR, integer_type_node,
+			 ARRAY_NOTATION_LENGTH (ii_tree));
+	  (*node)[ii][jj].stride =
+	    fold_build1 (CONVERT_EXPR, integer_type_node,
+			 ARRAY_NOTATION_STRIDE (ii_tree));
+	}
 
   release_vec_vec (array_exprs);
 }