This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] gcc/cfg*.[ch]: Fix formatting.


Hi,

Attached is a patch to fix formatting.  Committed as obvious.

Kazu Hirata

2002-05-21  Kazu Hirata  <kazu@cs.umass.edu>

	* cfgbuild.c: Fix formatting.
	* cfg.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfglayout.c: Likewise.
	* cfgloop.c: Likewise.
	* cfgrtl.c: Likewise.

Index: cfgbuild.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgbuild.c,v
retrieving revision 1.17
diff -u -r1.17 cfgbuild.c
--- cfgbuild.c	21 May 2002 20:37:37 -0000	1.17
+++ cfgbuild.c	22 May 2002 01:22:57 -0000
@@ -104,35 +104,35 @@
 
   switch (GET_CODE (insn))
     {
-      case NOTE:
-      case CODE_LABEL:
-	return false;
-
-      case JUMP_INSN:
-	/* Jump insn always causes control transfer except for tablejumps.  */
-	return (GET_CODE (PATTERN (insn)) != ADDR_VEC
-		&& GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC);
-
-      case CALL_INSN:
-	/* Call insn may return to the nonlocal goto handler.  */
-	return ((nonlocal_goto_handler_labels
-		 && (0 == (note = find_reg_note (insn, REG_EH_REGION,
-						 NULL_RTX))
-		     || INTVAL (XEXP (note, 0)) >= 0))
-		/* Or may trap.  */
-		|| can_throw_internal (insn));
-
-      case INSN:
-	return (flag_non_call_exceptions && can_throw_internal (insn));
-
-      case BARRIER:
-	/* It is nonsence to reach barrier when looking for the
-	   end of basic block, but before dead code is eliminated
-	   this may happen.  */
-	return false;
+    case NOTE:
+    case CODE_LABEL:
+      return false;
+
+    case JUMP_INSN:
+      /* Jump insn always causes control transfer except for tablejumps.  */
+      return (GET_CODE (PATTERN (insn)) != ADDR_VEC
+	      && GET_CODE (PATTERN (insn)) != ADDR_DIFF_VEC);
+
+    case CALL_INSN:
+      /* Call insn may return to the nonlocal goto handler.  */
+      return ((nonlocal_goto_handler_labels
+	       && (0 == (note = find_reg_note (insn, REG_EH_REGION,
+					       NULL_RTX))
+		   || INTVAL (XEXP (note, 0)) >= 0))
+	      /* Or may trap.  */
+	      || can_throw_internal (insn));
+
+    case INSN:
+      return (flag_non_call_exceptions && can_throw_internal (insn));
+
+    case BARRIER:
+      /* It is nonsence to reach barrier when looking for the
+         end of basic block, but before dead code is eliminated
+         this may happen.  */
+      return false;
 
-      default:
-	abort ();
+    default:
+      abort ();
     }
 }
 
@@ -207,9 +207,9 @@
 	      rtx lab = XEXP (note, 0), next;
 
 	      if ((next = next_nonnote_insn (lab)) != NULL
-		       && GET_CODE (next) == JUMP_INSN
-		       && (GET_CODE (PATTERN (next)) == ADDR_VEC
-			   || GET_CODE (PATTERN (next)) == ADDR_DIFF_VEC))
+		  && GET_CODE (next) == JUMP_INSN
+		  && (GET_CODE (PATTERN (next)) == ADDR_VEC
+		      || GET_CODE (PATTERN (next)) == ADDR_DIFF_VEC))
 		;
 	      else if (GET_CODE (lab) == NOTE)
 		;
@@ -305,7 +305,7 @@
 
 	    for (e = BASIC_BLOCK (i)->succ; e ; e = e->succ_next)
 	      if (e->dest != EXIT_BLOCK_PTR)
-	        SET_BIT (edge_cache[i], e->dest->index);
+		SET_BIT (edge_cache[i], e->dest->index);
 	  }
     }
 
@@ -849,7 +849,7 @@
 
 void
 find_sub_basic_blocks (bb)
-    basic_block bb;
+     basic_block bb;
 {
   int i;
   int min, max;
Index: cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfg.c,v
retrieving revision 1.27
diff -u -r1.27 cfg.c
--- cfg.c	19 May 2002 22:25:48 -0000	1.27
+++ cfg.c	22 May 2002 01:22:57 -0000
@@ -234,7 +234,7 @@
   after->next_bb = b;
   b->next_bb->prev_bb = b;
 }
-  
+
 /* Unlink block B from chain.  */
 void
 unlink_block (b)
@@ -243,7 +243,7 @@
   b->next_bb->prev_bb = b->prev_bb;
   b->prev_bb->next_bb = b->next_bb;
 }
-  
+
 
 /* Remove block B from the basic block array and compact behind it.  */
 
Index: cfgcleanup.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgcleanup.c,v
retrieving revision 1.57
diff -u -r1.57 cfgcleanup.c
--- cfgcleanup.c	21 May 2002 20:37:37 -0000	1.57
+++ cfgcleanup.c	22 May 2002 01:22:59 -0000
@@ -190,8 +190,8 @@
 
 static bool
 mark_effect (exp, nonequal)
-  rtx exp;
-  regset nonequal;
+     rtx exp;
+     regset nonequal;
 {
   int regno;
   rtx dest;
@@ -199,41 +199,41 @@
     {
       /* In case we do clobber the register, mark it as equal, as we know the
          value is dead so it don't have to match.  */
-      case CLOBBER:
-	if (REG_P (XEXP (exp, 0)))
-	  {
-	    dest = XEXP (exp, 0);
-	    regno = REGNO (dest);
-	    CLEAR_REGNO_REG_SET (nonequal, regno);
-	    if (regno < FIRST_PSEUDO_REGISTER)
-	      {
-		int n = HARD_REGNO_NREGS (regno, GET_MODE (dest));
-		while (--n > 0)
-		  CLEAR_REGNO_REG_SET (nonequal, regno + n);
-	      }
-	  }
-	return false;
+    case CLOBBER:
+      if (REG_P (XEXP (exp, 0)))
+	{
+	  dest = XEXP (exp, 0);
+	  regno = REGNO (dest);
+	  CLEAR_REGNO_REG_SET (nonequal, regno);
+	  if (regno < FIRST_PSEUDO_REGISTER)
+	    {
+	      int n = HARD_REGNO_NREGS (regno, GET_MODE (dest));
+	      while (--n > 0)
+		CLEAR_REGNO_REG_SET (nonequal, regno + n);
+	    }
+	}
+      return false;
 
-      case SET:
-	if (rtx_equal_for_cselib_p (SET_DEST (exp), SET_SRC (exp)))
-	  return false;
-	dest = SET_DEST (exp);
-	if (dest == pc_rtx)
-	  return false;
-	if (!REG_P (dest))
-	  return true;
-	regno = REGNO (dest);
-	SET_REGNO_REG_SET (nonequal, regno);
-	if (regno < FIRST_PSEUDO_REGISTER)
-	  {
-	    int n = HARD_REGNO_NREGS (regno, GET_MODE (dest));
-	    while (--n > 0)
-	      SET_REGNO_REG_SET (nonequal, regno + n);
-	  }
+    case SET:
+      if (rtx_equal_for_cselib_p (SET_DEST (exp), SET_SRC (exp)))
 	return false;
-
-      default:
+      dest = SET_DEST (exp);
+      if (dest == pc_rtx)
 	return false;
+      if (!REG_P (dest))
+	return true;
+      regno = REGNO (dest);
+      SET_REGNO_REG_SET (nonequal, regno);
+      if (regno < FIRST_PSEUDO_REGISTER)
+	{
+	  int n = HARD_REGNO_NREGS (regno, GET_MODE (dest));
+	  while (--n > 0)
+	    SET_REGNO_REG_SET (nonequal, regno + n);
+	}
+      return false;
+
+    default:
+      return false;
     }
 }
 
@@ -295,7 +295,7 @@
   /* Second branch must end with onlyjump, as we will eliminate the jump.  */
   if (!any_condjump_p (e->src->end))
     return NULL;
-  
+
   if (!any_condjump_p (b->end) || !onlyjump_p (b->end))
     {
       BB_SET_FLAG (b, BB_NONTHREADABLE_BLOCK);
@@ -357,22 +357,22 @@
 
   for (insn = NEXT_INSN (b->head); insn != NEXT_INSN (b->end) && !failed;
        insn = NEXT_INSN (insn))
-  {
-    if (INSN_P (insn))
-      {
-        rtx pat = PATTERN (insn);
+    {
+      if (INSN_P (insn))
+	{
+	  rtx pat = PATTERN (insn);
 
-        if (GET_CODE (pat) == PARALLEL)
-	  {
-	    for (i = 0; i < XVECLEN (pat, 0); i++)
-	      failed |= mark_effect (XVECEXP (pat, 0, i), nonequal);
-	  }
-	else
-	  failed |= mark_effect (pat, nonequal);
-      }
+	  if (GET_CODE (pat) == PARALLEL)
+	    {
+	      for (i = 0; i < XVECLEN (pat, 0); i++)
+		failed |= mark_effect (XVECEXP (pat, 0, i), nonequal);
+	    }
+	  else
+	    failed |= mark_effect (pat, nonequal);
+	}
 
-    cselib_process_insn (insn);
-  }
+      cselib_process_insn (insn);
+    }
 
   /* Later we should clear nonequal of dead registers.  So far we don't
      have life information in cfg_cleanup.  */
@@ -504,7 +504,7 @@
 	  if (mode & CLEANUP_PRE_LOOP)
 	    {
 	      rtx insn = (target->succ->flags & EDGE_FALLTHRU
-		          ? target->head : prev_nonnote_insn (target->end));
+			  ? target->head : prev_nonnote_insn (target->end));
 
 	      if (GET_CODE (insn) != NOTE)
 		insn = NEXT_INSN (insn);
@@ -522,7 +522,7 @@
 	  counter++;
 	  target = new_target;
 	  threaded |= new_target_threaded;
-  	}
+	}
 
       if (counter >= n_basic_blocks)
 	{
@@ -545,7 +545,7 @@
 	    {
 	      notice_new_block (redirect_edge_and_branch_force (e, target));
 	      if (rtl_dump_file)
-	        fprintf (rtl_dump_file, "Conditionals threaded.\n");
+		fprintf (rtl_dump_file, "Conditionals threaded.\n");
 	    }
 	  else if (!redirect_edge_and_branch (e, target))
 	    {
@@ -614,7 +614,7 @@
 		      && first == threaded_edges [n]->src)
 		    n++;
 		  t = first->succ;
-		 }
+		}
 
 	      t->count -= edge_count;
 	      if (t->count < 0)
@@ -812,7 +812,7 @@
 
       if (rtl_dump_file)
 	fprintf (rtl_dump_file, "Merged %d and %d without moving.\n",
-                 b_index, c_index);
+		 b_index, c_index);
 
       return true;
     }
@@ -886,8 +886,8 @@
 
 static bool
 insns_match_p (mode, i1, i2)
-	int mode ATTRIBUTE_UNUSED;
-	rtx i1, i2;
+     int mode ATTRIBUTE_UNUSED;
+     rtx i1, i2;
 {
   rtx p1, p2;
 
@@ -1057,10 +1057,10 @@
 	      remove_note (i1, equiv1);
 	      remove_note (i2, equiv2);
 	    }
-	     
+
 	  afterlast1 = last1, afterlast2 = last2;
 	  last1 = i1, last2 = i2;
-          ninsns++;
+	  ninsns++;
 	}
 
       i1 = PREV_INSN (i1);
@@ -1135,7 +1135,7 @@
       enum rtx_code code1, code2;
 
       if (!bb2->succ
-          || !bb2->succ->succ_next
+	  || !bb2->succ->succ_next
 	  || bb2->succ->succ_next->succ_next
 	  || !any_condjump_p (bb2->end)
 	  || !onlyjump_p (bb2->end))
@@ -1284,9 +1284,9 @@
   if (fallthru1)
     {
       basic_block d1 = (forwarder_block_p (fallthru1->dest)
-	                ? fallthru1->dest->succ->dest: fallthru1->dest);
+			? fallthru1->dest->succ->dest: fallthru1->dest);
       basic_block d2 = (forwarder_block_p (fallthru2->dest)
-	                ? fallthru2->dest->succ->dest: fallthru2->dest);
+			? fallthru2->dest->succ->dest: fallthru2->dest);
 
       if (d1 != d2)
 	return false;
@@ -1759,7 +1759,7 @@
   find_unreachable_blocks ();
 
   /* Delete all unreachable basic blocks.  Do compaction concurrently,
-     as otherwise we can wind up with O(N^2) behaviour here when we 
+     as otherwise we can wind up with O(N^2) behaviour here when we
      have oodles of dead code.  */
 
   for (i = j = 0; i < n_basic_blocks; ++i)
Index: cfglayout.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfglayout.c,v
retrieving revision 1.15
diff -u -r1.15 cfglayout.c
--- cfglayout.c	21 May 2002 20:37:37 -0000	1.15
+++ cfglayout.c	22 May 2002 01:23:00 -0000
@@ -127,7 +127,7 @@
 	      last_insn = insn;
 	      continue;
 	    }
-          break;
+	  break;
 
 	default:
 	  break;
@@ -137,7 +137,7 @@
     }
 
   /* It is possible to hit contradictory sequence.  For instance:
-    
+
      jump_insn
      NOTE_INSN_LOOP_BEG
      barrier
@@ -152,14 +152,14 @@
       if (GET_CODE (insn) == NOTE)
 	switch (NOTE_LINE_NUMBER (insn))
 	  {
-          case NOTE_INSN_LOOP_END:
-          case NOTE_INSN_BLOCK_END:
-          case NOTE_INSN_DELETED:
-          case NOTE_INSN_DELETED_LABEL:
+	  case NOTE_INSN_LOOP_END:
+	  case NOTE_INSN_BLOCK_END:
+	  case NOTE_INSN_DELETED:
+	  case NOTE_INSN_DELETED_LABEL:
 	    continue;
-          default:
+	  default:
 	    reorder_insns (insn, insn, last_insn);
-        }
+	  }
     }
 
   return last_insn;
@@ -192,7 +192,7 @@
 {
   rtx next_insn = get_insns ();
   int i;
-  
+
   for (i = 0; i < n_basic_blocks; i++)
     {
       basic_block bb = BASIC_BLOCK (i);
@@ -203,7 +203,7 @@
 					      PREV_INSN (bb->head));
       end = skip_insns_after_block (bb);
       if (NEXT_INSN (bb->end) && bb->end != end)
-        RBI (bb)->footer = unlink_insn_chain (NEXT_INSN (bb->end), end);
+	RBI (bb)->footer = unlink_insn_chain (NEXT_INSN (bb->end), end);
       next_insn = NEXT_INSN (bb->end);
     }
 
@@ -461,7 +461,7 @@
 		    }
 		}
 
-	      /* Otherwise we can try to invert the jump.  This will 
+	      /* Otherwise we can try to invert the jump.  This will
 		 basically never fail, however, keep up the pretense.  */
 	      else if (invert_jump (bb_end_insn,
 				    label_for_bb (e_fall->dest), 0))
@@ -883,7 +883,7 @@
 
   insn = duplicate_insn_chain (bb->head, bb->end);
   new_bb = create_basic_block (insn,
-		 	       insn ? get_last_insn () : NULL,
+			       insn ? get_last_insn () : NULL,
 			       EXIT_BLOCK_PTR->prev_bb);
   alloc_aux_for_block (new_bb, sizeof (struct reorder_block_def));
 
@@ -933,12 +933,12 @@
   bb->count -= new_count;
 
   if (e)
-   {
-     new_bb->frequency = EDGE_FREQUENCY (e);
-     bb->frequency -= EDGE_FREQUENCY (e);
+    {
+      new_bb->frequency = EDGE_FREQUENCY (e);
+      bb->frequency -= EDGE_FREQUENCY (e);
 
-     cfg_layout_redirect_edge (e, new_bb);
-   }
+      cfg_layout_redirect_edge (e, new_bb);
+    }
 
   if (bb->count < 0)
     bb->count = 0;
Index: cfgloop.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgloop.c,v
retrieving revision 1.8
diff -u -r1.8 cfgloop.c
--- cfgloop.c	17 May 2002 02:31:28 -0000	1.8
+++ cfgloop.c	22 May 2002 01:23:01 -0000
@@ -110,9 +110,9 @@
 
   if (loop->first->head && loop->last->end)
     fprintf (file, ";;\n;; Loop %d (%d to %d):%s%s\n",
-	    loop->num, INSN_UID (loop->first->head),
-	    INSN_UID (loop->last->end),
-	    loop->shared ? " shared" : "", loop->invalid ? " invalid" : "");
+	     loop->num, INSN_UID (loop->first->head),
+	     INSN_UID (loop->last->end),
+	     loop->shared ? " shared" : "", loop->invalid ? " invalid" : "");
   else
     fprintf (file, ";;\n;; Loop %d:%s%s\n", loop->num,
 	     loop->shared ? " shared" : "", loop->invalid ? " invalid" : "");
Index: cfgrtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cfgrtl.c,v
retrieving revision 1.49
diff -u -r1.49 cfgrtl.c
--- cfgrtl.c	21 May 2002 20:37:38 -0000	1.49
+++ cfgrtl.c	22 May 2002 01:23:02 -0000
@@ -90,7 +90,7 @@
 {
   return (NOTE_LINE_NUMBER (note) == NOTE_INSN_DELETED
 	  || NOTE_LINE_NUMBER (note) == NOTE_INSN_BASIC_BLOCK
-          || NOTE_LINE_NUMBER (note) == NOTE_INSN_PREDICTION);
+	  || NOTE_LINE_NUMBER (note) == NOTE_INSN_PREDICTION);
 }
 
 /* True if a given label can be deleted.  */
@@ -119,7 +119,7 @@
   if (GET_CODE (insn) == CODE_LABEL)
     {
       /* Some labels can't be directly removed from the INSN chain, as they
-         might be references via variables, constant pool etc. 
+         might be references via variables, constant pool etc.
          Convert them to the special NOTE_INSN_DELETED_LABEL note.  */
       if (! can_delete_label_p (insn))
 	{
@@ -381,13 +381,13 @@
      NOTE_INSN_EH_REGION_END notes.  */
 
   /* Get rid of all NOTE_INSN_PREDICTIONs hanging before the block.  */
-  
+
   for (insn = PREV_INSN (b->head); insn; insn = PREV_INSN (insn))
     {
       if (GET_CODE (insn) != NOTE)
-        break;
+	break;
       if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_PREDICTION)
-        NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED;
+	NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED;
     }
 
   insn = b->head;
@@ -434,7 +434,7 @@
      basic_block b;
 {
   int deleted_handler = flow_delete_block_noexpunge (b);
-  
+
   /* Remove the basic block from the array, and compact behind it.  */
   expunge_block (b);
 
@@ -1371,8 +1371,8 @@
       /* The first insn after the call may be a stack pop, skip it.  */
       while (next
 	     && keep_with_call_p (next))
-        {
-          after = next;
+	{
+	  after = next;
 	  next = next_nonnote_insn (next);
 	}
       bb = e->dest;
@@ -1833,17 +1833,17 @@
 	    }
 	}
       if (bb->count < 0)
-        {
-          error ("verify_flow_info: Wrong count of block %i %i",
+	{
+	  error ("verify_flow_info: Wrong count of block %i %i",
 	         bb->index, (int)bb->count);
-          err = 1;
-        }
+	  err = 1;
+	}
       if (bb->frequency < 0)
-        {
-          error ("verify_flow_info: Wrong frequency of block %i %i",
+	{
+	  error ("verify_flow_info: Wrong frequency of block %i %i",
 	         bb->index, bb->frequency);
-          err = 1;
-        }
+	  err = 1;
+	}
       for (e = bb->succ; e; e = e->succ_next)
 	{
 	  if (last_visited [e->dest->index + 2] == bb)
@@ -1971,7 +1971,7 @@
 	  error ("Abnormal edges for no purpose in bb %i", bb->index);
 	  err = 1;
 	}
-	
+
       if (!n_fallthru)
 	{
 	  rtx insn;
@@ -2223,7 +2223,7 @@
 
 	  /* Avoid abnormal flags to leak from computed jumps turned
 	     into simplejumps.  */
- 
+
 	  e->flags &= ~EDGE_ABNORMAL;
 
 	  /* See if this edge is one we should keep.  */
@@ -2265,7 +2265,7 @@
 	{
 	  bb->succ->probability = REG_BR_PROB_BASE;
 	  bb->succ->count = bb->count;
-        }
+	}
       else
 	{
 	  note = find_reg_note (insn, REG_BR_PROB, NULL);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]