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/t*.c: Fix formatting.


Hi,

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

Kazu Hirata

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

	* timevar.c: Fix formatting.
	* tlink.c: Likewise.
	* toplev.c: Likewise.
	* tree-dump.c: Likewise.
	* tree-inline.c: Likewise.

Index: timevar.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/timevar.c,v
retrieving revision 1.19
diff -u -r1.19 timevar.c
--- timevar.c	16 Nov 2001 02:36:39 -0000	1.19
+++ timevar.c	18 May 2002 15:10:38 -0000
@@ -171,7 +171,7 @@
 static void get_time
   PARAMS ((struct timevar_time_def *));
 static void timevar_accumulate
-  PARAMS ((struct timevar_time_def *, struct timevar_time_def *, 
+  PARAMS ((struct timevar_time_def *, struct timevar_time_def *,
 	   struct timevar_time_def *));
 
 /* Fill the current times into TIME.  The definition of this function
@@ -210,11 +210,11 @@
 
 /* Add the difference between STOP_TIME and START_TIME to TIMER.  */
 
-static void 
+static void
 timevar_accumulate (timer, start_time, stop_time)
-  struct timevar_time_def *timer;
-  struct timevar_time_def *start_time;
-  struct timevar_time_def *stop_time;
+     struct timevar_time_def *timer;
+     struct timevar_time_def *start_time;
+     struct timevar_time_def *stop_time;
 {
   timer->user += stop_time->user - start_time->user;
   timer->sys += stop_time->sys - start_time->sys;
@@ -249,7 +249,7 @@
 /* Push TIMEVAR onto the timing stack.  No further elapsed time is
    attributed to the previous topmost timing variable on the stack;
    subsequent elapsed time is attributed to TIMEVAR, until it is
-   popped or another element is pushed on top. 
+   popped or another element is pushed on top.
 
    TIMEVAR cannot be running as a standalone timer.  */
 
@@ -285,13 +285,13 @@
 
   /* See if we have a previously-allocated stack instance.  If so,
      take it off the list.  If not, malloc a new one.  */
-  if (unused_stack_instances != NULL) 
+  if (unused_stack_instances != NULL)
     {
       context = unused_stack_instances;
       unused_stack_instances = unused_stack_instances->next;
     }
   else
-    context = (struct timevar_stack_def *) 
+    context = (struct timevar_stack_def *)
       xmalloc (sizeof (struct timevar_stack_def));
 
   /* Fill it in and put it on the stack.  */
@@ -396,7 +396,7 @@
   struct timevar_time_def now;
 
   *elapsed = tv->elapsed;
-  
+
   /* Is TIMEVAR currently running as a standalone timer?  */
   if (tv->standalone)
     {
@@ -472,21 +472,21 @@
 
 #ifdef HAVE_USER_TIME
       /* Print user-mode time for this process.  */
-      fprintf (fp, "%7.2f (%2.0f%%) usr", 
+      fprintf (fp, "%7.2f (%2.0f%%) usr",
 	       tv->elapsed.user,
 	       (total->user == 0 ? 0 : tv->elapsed.user / total->user) * 100);
 #endif /* HAVE_USER_TIME */
 
 #ifdef HAVE_SYS_TIME
       /* Print system-mode time for this process.  */
-      fprintf (fp, "%7.2f (%2.0f%%) sys", 
+      fprintf (fp, "%7.2f (%2.0f%%) sys",
 	       tv->elapsed.sys,
 	       (total->sys == 0 ? 0 : tv->elapsed.sys / total->sys) * 100);
 #endif /* HAVE_SYS_TIME */
 
 #ifdef HAVE_WALL_TIME
       /* Print wall clock time elapsed.  */
-      fprintf (fp, "%7.2f (%2.0f%%) wall", 
+      fprintf (fp, "%7.2f (%2.0f%%) wall",
 	       tv->elapsed.wall,
 	       (total->wall == 0 ? 0 : tv->elapsed.wall / total->wall) * 100);
 #endif /* HAVE_WALL_TIME */
@@ -498,15 +498,15 @@
   fputs (_(" TOTAL                 :"), fp);
 #ifdef HAVE_USER_TIME
   fprintf (fp, "%7.2f          ", total->user);
-#endif 
+#endif
 #ifdef HAVE_SYS_TIME
   fprintf (fp, "%7.2f          ", total->sys);
 #endif
 #ifdef HAVE_WALL_TIME
   fprintf (fp, "%7.2f\n", total->wall);
 #endif
-  
-#endif /* defined (HAVE_USER_TIME) || defined (HAVE_SYS_TIME) 
+
+#endif /* defined (HAVE_USER_TIME) || defined (HAVE_SYS_TIME)
 	  || defined (HAVE_WALL_TIME) */
 }
 
@@ -533,6 +533,6 @@
   fprintf (stderr,
 	   _("time in %s: %ld.%06ld (%ld%%)\n"),
 	   str, total / 1000000, total % 1000000,
- 	   all_time == 0 ? 0
- 	   : (long) (((100.0 * (double) total) / (double) all_time) + .5));
+	   all_time == 0 ? 0
+	   : (long) (((100.0 * (double) total) / (double) all_time) + .5));
 }
Index: tlink.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tlink.c,v
retrieving revision 1.39
diff -u -r1.39 tlink.c
--- tlink.c	9 Nov 2001 23:13:21 -0000	1.39
+++ tlink.c	18 May 2002 15:10:38 -0000
@@ -132,7 +132,7 @@
      int create;
 {
   return ((struct symbol_hash_entry *)
-	  hash_lookup (&symbol_table, (const hash_table_key) string, 
+	  hash_lookup (&symbol_table, (const hash_table_key) string,
 		       create, string_copy));
 }
 
@@ -169,7 +169,7 @@
      const char *string;
 {
   return ((struct file_hash_entry *)
-	  hash_lookup (&file_table, (const hash_table_key) string, true, 
+	  hash_lookup (&file_table, (const hash_table_key) string, true,
 		       string_copy));
 }
 
@@ -204,7 +204,7 @@
      int create;
 {
   return ((struct demangled_hash_entry *)
-	  hash_lookup (&demangled_table, (const hash_table_key) string, 
+	  hash_lookup (&demangled_table, (const hash_table_key) string,
 		       create, string_copy));
 }
 
@@ -292,7 +292,7 @@
 
   hash_table_init (&symbol_table, symbol_hash_newfunc, string_hash,
 		   string_compare);
-  hash_table_init (&file_table, file_hash_newfunc, string_hash, 
+  hash_table_init (&file_table, file_hash_newfunc, string_hash,
 		   string_compare);
   hash_table_init (&demangled_table, demangled_hash_newfunc,
 		   string_hash, string_compare);
@@ -320,7 +320,7 @@
 {
   collect_execute (prog, argv, redir);
   return collect_wait (prog);
-} 
+}
 
 static char *
 frob_extension (s, ext)
@@ -425,7 +425,7 @@
   FILE *stream = fopen ((char*) f->root.key, "r");
 
   if (tlink_verbose >= 2)
-    fprintf (stderr, _("collect: reading %s\n"), 
+    fprintf (stderr, _("collect: reading %s\n"),
 	     (char*) f->root.key);
 
   while (fscanf (stream, "%c ", &c) == 1)
@@ -497,7 +497,7 @@
 
   putenv (xstrdup ("COMPILER_PATH"));
   putenv (xstrdup ("LIBRARY_PATH"));
-  
+
   while ((f = file_pop ()) != NULL)
     {
       char *line, *command;
@@ -587,7 +587,7 @@
   while ((sym = symbol_pop ()) != NULL)
     {
       demangled *dem;
-      const char *p = cplus_demangle ((char*) sym->root.key, 
+      const char *p = cplus_demangle ((char*) sym->root.key,
 				DMGL_PARAMS | DMGL_ANSI);
 
       if (! p)
@@ -613,7 +613,7 @@
       char *p = line, *q;
       symbol *sym;
       int end;
-      
+
       while (*p && ISSPACE ((unsigned char)*p))
 	++p;
 
@@ -679,8 +679,8 @@
 	      if (dem)
 		sym = symbol_hash_lookup (dem->mangled, false);
 	      else
-	        {
-	          if (*p == '_' && prepends_underscore)
+		{
+		  if (*p == '_' && prepends_underscore)
 		    ++p;
 		  sym = symbol_hash_lookup (p, false);
 		}
@@ -700,7 +700,7 @@
 	  sym->tweaking = 1;
 	  file_push (sym->file);
 	}
-	
+
       obstack_free (&temporary_obstack, temporary_firstobj);
     }
 
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.626
diff -u -r1.626 toplev.c
--- toplev.c	17 May 2002 22:46:21 -0000	1.626
+++ toplev.c	18 May 2002 15:10:42 -0000
@@ -2512,7 +2512,7 @@
   rebuild_jump_labels (insns);
   find_exception_handler_labels ();
   find_basic_blocks (insns, max_reg_num (), rtl_dump_file);
-  
+
   delete_unreachable_blocks ();
 
   /* Turn NOTE_INSN_PREDICTIONs into branch predictions.  */
@@ -2528,7 +2528,7 @@
       /* There is pass ordering problem - we must lower NOTE_INSN_PREDICTION
          notes before simplifying cfg and we must do lowering after sibcall
          that unhides parts of RTL chain and cleans up the CFG.
-        
+
          Until sibcall is replaced by tree-level optimizer, lets just
          sweep away the NOTE_INSN_PREDICTION notes that leaked out.  */
       for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
@@ -3868,7 +3868,7 @@
       stack_limit_rtx = gen_rtx_SYMBOL_REF (Pmode, nm);
     }
   else if ((option_value
-            = skip_leading_substring (arg, "message-length=")))
+	    = skip_leading_substring (arg, "message-length=")))
     output_set_maximum_length
       (&global_dc->buffer, read_integral_parameter
        (option_value, arg - 2, diagnostic_line_cutoff (global_dc)));
Index: tree-dump.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-dump.c,v
retrieving revision 1.5
diff -u -r1.5 tree-dump.c
--- tree-dump.c	15 Mar 2002 20:08:25 -0000	1.5
+++ tree-dump.c	18 May 2002 15:10:47 -0000
@@ -65,7 +65,7 @@
   dni = (dump_node_info_p) xmalloc (sizeof (struct dump_node_info));
   dni->index = index;
   dni->binfo_p = ((flags & DUMP_BINFO) != 0);
-  dq->node = splay_tree_insert (di->nodes, (splay_tree_key) t, 
+  dq->node = splay_tree_insert (di->nodes, (splay_tree_key) t,
 				(splay_tree_value) dni);
 
   /* Add it to the end of the queue.  */
@@ -156,7 +156,7 @@
      dump_info_p di;
 {
   int extra;
-  
+
   /* See if we need a new line.  */
   if (di->column > EOL_COLUMN)
     dump_new_line (di);
@@ -247,7 +247,7 @@
 
 /* Dump the next node in the queue.  */
 
-static void 
+static void
 dequeue_and_dump (di)
      dump_info_p di;
 {
@@ -300,7 +300,7 @@
 	dump_string (di, "priv");
       if (TREE_VIA_VIRTUAL (t))
 	dump_string (di, "virt");
-	    
+
       dump_child ("type", BINFO_TYPE (t));
       dump_child ("base", BINFO_BASETYPES (t));
 
@@ -319,17 +319,17 @@
 	case '1':
 	  dump_child ("op 0", TREE_OPERAND (t, 0));
 	  break;
-	      
+
 	case '2':
 	case '<':
 	  dump_child ("op 0", TREE_OPERAND (t, 0));
 	  dump_child ("op 1", TREE_OPERAND (t, 1));
 	  break;
-	      
+
 	case 'e':
 	  /* These nodes are handled explicitly below.  */
 	  break;
-	      
+
 	default:
 	  abort ();
 	}
@@ -339,7 +339,7 @@
       /* All declarations have names.  */
       if (DECL_NAME (t))
 	dump_child ("name", DECL_NAME (t));
-      if (DECL_ASSEMBLER_NAME_SET_P (t) 
+      if (DECL_ASSEMBLER_NAME_SET_P (t)
 	  && DECL_ASSEMBLER_NAME (t) != DECL_NAME (t))
 	dump_child ("mngl", DECL_ASSEMBLER_NAME (t));
       /* And types.  */
@@ -356,7 +356,7 @@
 	    ++filename;
 
 	  dump_maybe_newline (di);
-	  fprintf (di->stream, "srcp: %s:%-6d ", filename, 
+	  fprintf (di->stream, "srcp: %s:%-6d ", filename,
 		   DECL_SOURCE_LINE (t));
 	  di->column += 6 + strlen (filename) + 8;
 	}
@@ -370,7 +370,7 @@
     {
       /* All types have qualifiers.  */
       int quals = (*lang_hooks.tree_dump.type_quals) (t);
-      
+
       if (quals != TYPE_UNQUALIFIED)
 	{
 	  fprintf (di->stream, "qual: %c%c%c     ",
@@ -386,7 +386,7 @@
       /* All types have a main variant.  */
       if (TYPE_MAIN_VARIANT (t) != t)
 	dump_child ("unql", TYPE_MAIN_VARIANT (t));
-      
+
       /* And sizes.  */
       dump_child ("size", TYPE_SIZE (t));
 
@@ -473,10 +473,10 @@
 	dump_string (di, "struct");
       else
 	dump_string (di, "union");
-      
+
       dump_child ("flds", TYPE_FIELDS (t));
       dump_child ("fncs", TYPE_METHODS (t));
-      queue_and_dump_index (di, "binf", TYPE_BINFO (t), 
+      queue_and_dump_index (di, "binf", TYPE_BINFO (t),
 			    DUMP_BINFO);
       break;
 
@@ -502,7 +502,7 @@
 	  if (DECL_FIELD_OFFSET (t))
 	    dump_child ("bpos", bit_position (t));
 	}
-      else if (TREE_CODE (t) == VAR_DECL 
+      else if (TREE_CODE (t) == VAR_DECL
 	       || TREE_CODE (t) == PARM_DECL)
 	{
 	  dump_int (di, "used", TREE_USED (t));
@@ -566,7 +566,7 @@
       dump_child ("decl", DECL_STMT_DECL (t));
       dump_next_stmt (di, t);
       break;
-      
+
     case DO_STMT:
       dump_stmt (di, t);
       dump_child ("body", DO_BODY (t));
@@ -720,7 +720,7 @@
 	 becomes NULL.  */
       dump_child ("init", TREE_OPERAND (t, 3));
       break;
-      
+
     case EXPR_WITH_FILE_LOCATION:
       dump_child ("expr", EXPR_WFL_NODE (t));
       break;
@@ -733,7 +733,7 @@
  done:
   if (dump_flag (di, TDF_ADDRESS, NULL))
     dump_pointer (di, "addr", (void *)t);
-  
+
   /* Terminate the line.  */
   fprintf (di->stream, "\n");
 }
@@ -770,7 +770,7 @@
   di.free_list = 0;
   di.flags = flags;
   di.node = t;
-  di.nodes = splay_tree_new (splay_tree_compare_pointers, 0, 
+  di.nodes = splay_tree_new (splay_tree_compare_pointers, 0,
 			     (splay_tree_delete_value_fn) &free);
 
   /* Queue up the first node.  */
@@ -838,10 +838,10 @@
 {
   FILE *stream;
   char *name;
-  
+
   if (!dump_files[phase].state)
     return NULL;
-  
+
   name = concat (dump_base_name, dump_files[phase].suffix, NULL);
   stream = fopen (name, dump_files[phase].state < 0 ? "w" : "a");
   if (!stream)
@@ -851,7 +851,7 @@
   free (name);
   if (flag_ptr)
     *flag_ptr = dump_files[phase].flags;
-  
+
   return stream;
 }
 
@@ -893,26 +893,26 @@
 {
   unsigned ix;
   const char *option_value;
-  
+
   for (ix = 0; ix != TDI_end; ix++)
     if ((option_value = skip_leading_substring (arg, dump_files[ix].swtch)))
       {
 	const char *ptr = option_value;
 	int flags = 0;
-	
+
 	while (*ptr)
 	  {
 	    const struct dump_option_value_info *option_ptr;
 	    const char *end_ptr;
 	    unsigned length;
-	    
+
 	    while (*ptr == '-')
 	      ptr++;
 	    end_ptr = strchr (ptr, '-');
 	    if (!end_ptr)
 	      end_ptr = ptr + strlen (ptr);
 	    length = end_ptr - ptr;
-	    
+
 	    for (option_ptr = dump_options; option_ptr->name;
 		 option_ptr++)
 	      if (strlen (option_ptr->name) == length
@@ -926,10 +926,10 @@
 	  found:;
 	    ptr = end_ptr;
 	  }
-	
+
 	dump_files[ix].state = -1;
 	dump_files[ix].flags = flags;
-	
+
 	return 1;
       }
   return 0;
Index: tree-inline.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
retrieving revision 1.22
diff -u -r1.22 tree-inline.c
--- tree-inline.c	30 Apr 2002 20:48:55 -0000	1.22
+++ tree-inline.c	18 May 2002 15:10:48 -0000
@@ -38,11 +38,11 @@
 
 /* This should be eventually be generalized to other languages, but
    this would require a shared function-as-trees infrastructure.  */
-#include "c-common.h" 
+#include "c-common.h"
 
 /* 0 if we should not perform inlining.
-   1 if we should expand functions calls inline at the tree level.  
-   2 if we should consider *all* functions to be inline 
+   1 if we should expand functions calls inline at the tree level.
+   2 if we should consider *all* functions to be inline
    candidates.  */
 
 int flag_inline_trees = 0;
@@ -166,7 +166,7 @@
 	     DECL_ANON_UNION_ELEMS.  */
 	  tree members = NULL;
 	  tree src;
-	  
+
 	  for (src = DECL_ANON_UNION_ELEMS (t); src;
 	       src = TREE_CHAIN (src))
 	    {
@@ -178,7 +178,7 @@
 	    }
 	  DECL_ANON_UNION_ELEMS (t) = nreverse (members);
 	}
-      
+
       /* Remember it, so that if we encounter this local entity
 	 again we can reuse this copy.  */
       n = splay_tree_insert (id->decl_map,
@@ -563,7 +563,7 @@
 
       /* See if we need to clean up the declaration.  */
       cleanup = (*lang_hooks.maybe_build_cleanup) (var);
-      if (cleanup) 
+      if (cleanup)
 	{
 	  tree cleanup_stmt;
 	  /* Build the cleanup statement.  */
@@ -677,7 +677,7 @@
 
   /* Assume it is not inlinable.  */
   inlinable = 0;
-       
+
   /* The number of instructions (estimated) of current function.  */
   currfn_insns = DECL_NUM_STMTS (fn) * INSNS_PER_STMT;
 
@@ -693,7 +693,7 @@
   else if (! DECL_INLINE (fn))
     ;
   /* We can't inline functions that are too big.  Only allow a single
-     function to be of MAX_INLINE_INSNS_SINGLE size.  Make special 
+     function to be of MAX_INLINE_INSNS_SINGLE size.  Make special
      allowance for extern inline functions, though.  */
   else if (! (*lang_hooks.tree_inlining.disregard_inline_limits) (fn)
 	   && currfn_insns > MAX_INLINE_INSNS_SINGLE)
@@ -712,7 +712,7 @@
      can inline this function, investigate further.  */
   if (! (*lang_hooks.tree_inlining.disregard_inline_limits) (fn)
       && inlinable)
-    { 
+    {
       int sum_insns = (id ? id->inlined_stmts : 0) * INSNS_PER_STMT
 		     + currfn_insns;
       /* In the extreme case that we have exceeded the recursive inlining
@@ -726,7 +726,7 @@
          though.  */
       else if ((sum_insns > MAX_INLINE_INSNS)
 	       && (currfn_insns > MIN_INLINE_INSNS))
-        {
+	{
 	  int max_curr = MAX_INLINE_INSNS_SINGLE
 			- (sum_insns - MAX_INLINE_INSNS) / MAX_INLINE_SLOPE;
 	  if (currfn_insns > max_curr)
@@ -736,7 +736,7 @@
 
   if (inlinable && (*lang_hooks.tree_inlining.cannot_inline_tree_fn) (&fn))
     inlinable = 0;
-  
+
   /* If we don't have the function body available, we can't inline
      it.  */
   if (! DECL_SAVED_TREE (fn))
@@ -1034,7 +1034,7 @@
 {
   inline_data id;
   tree prev_fn;
-  
+
   /* Clear out ID.  */
   memset (&id, 0, sizeof (id));
 
@@ -1051,7 +1051,7 @@
 
   prev_fn = ((*lang_hooks.tree_inlining.add_pending_fn_decls)
 	     (&id.fns, prev_fn));
-  
+
   /* Create the stack of TARGET_EXPRs.  */
   VARRAY_TREE_INIT (id.target_exprs, 32, "target_exprs");
 
@@ -1075,7 +1075,7 @@
   if (DECL_LANG_SPECIFIC (fn))
     {
       tree ifn = make_tree_vec (VARRAY_ACTIVE_SIZE (id.inlined_fns));
-      
+
       memcpy (&TREE_VEC_ELT (ifn, 0), &VARRAY_TREE (id.inlined_fns, 0),
 	      VARRAY_ACTIVE_SIZE (id.inlined_fns) * sizeof (tree));
       DECL_INLINED_FNS (fn) = ifn;
@@ -1122,7 +1122,7 @@
    to record the nodes visited, and to avoid visiting a node more than
    once.  */
 
-tree 
+tree
 walk_tree (tp, func, data, htab_)
      tree *tp;
      walk_tree_fn func;
@@ -1133,7 +1133,7 @@
   enum tree_code code;
   int walk_subtrees;
   tree result;
-  
+
 #define WALK_SUBTREE(NODE)				\
   do							\
     {							\
@@ -1159,7 +1159,7 @@
   if (htab)
     {
       void **slot;
-      
+
       /* Don't walk the same tree twice, if the user has requested
          that we avoid doing so.  */
       if (htab_find (htab, *tp))
@@ -1219,8 +1219,8 @@
 	 entire statement tree.  */
       if (statement_code_p (code))
 	{
-	  if (code == DECL_STMT 
-	      && DECL_STMT_DECL (*tp) 
+	  if (code == DECL_STMT
+	      && DECL_STMT_DECL (*tp)
 	      && DECL_P (DECL_STMT_DECL (*tp)))
 	    {
 	      /* Walk the DECL_INITIAL and DECL_SIZE.  We don't want to walk
@@ -1342,10 +1342,10 @@
 #undef WALK_SUBTREE
 }
 
-/* Like walk_tree, but does not walk duplicate nodes more than 
+/* Like walk_tree, but does not walk duplicate nodes more than
    once.  */
 
-tree 
+tree
 walk_tree_without_duplicates (tp, func, data)
      tree *tp;
      walk_tree_fn func;
@@ -1422,7 +1422,7 @@
 
   /* See if we already encountered this SAVE_EXPR.  */
   n = splay_tree_lookup (st, (splay_tree_key) *tp);
-      
+
   /* If we didn't already remap this SAVE_EXPR, do so now.  */
   if (!n)
     {


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