[patch] beginner projects

Zoltan Felleg zfelleg@telnet.hu
Sat Jun 16 06:20:00 GMT 2001


Hello,

The first patch fixes a small typo in contrib/warn_summary

The second removes two unused/deprecated functions (namely
dump_one_node and dump_node_dependence) and constants used
by them (dependence_string, direction_string) from
gcc/dependence.c, which were hidden at 2000-08-24.

The third fixes a typo, and removes an unused #include from
gcc/fp-test.c

The fourth one removes an unused #include from gcc/gmon.c
(As this file was not modified since more than 18 months,
it should be really unused).

Index: gcc/contrib/warn_summary
===================================================================
RCS file: /data/download/gcc-cvs/gcc/contrib/warn_summary,v
retrieving revision 1.6
diff -c -3 -p -r1.6 warn_summary
*** gcc/contrib/warn_summary	2001/01/15 17:53:57	1.6
--- gcc/contrib/warn_summary	2001/06/16 08:19:09
***************
*** 7,13 ****
  # 	[-pass|-wpass] [file(s)]
  #
  # -llf
! # Filter out long lines from the bootstap output before any other
  # action.  This is useful for systems with broken awks/greps which
choke
  # on long lines.  It is not done by default as it sometimes slows
things
  # down.
--- 7,13 ----
  # 	[-pass|-wpass] [file(s)]
  #
  # -llf
! # Filter out long lines from the bootstrap output before any other
  # action.  This is useful for systems with broken awks/greps which
choke
  # on long lines.  It is not done by default as it sometimes slows
things
  # down.
Index: gcc/gcc/dependence.c
===================================================================
RCS file: /data/download/gcc-cvs/gcc/gcc/dependence.c,v
retrieving revision 1.5
diff -c -3 -p -r1.5 dependence.c
*** gcc/gcc/dependence.c	2000/09/17 07:38:11	1.5
--- gcc/gcc/dependence.c	2001/06/16 09:07:02
*************** Boston, MA 02111-1307, USA.  */
*** 60,73 ****
  */
  
  enum dependence_type {dt_flow, dt_anti, dt_output, dt_none};
! #if 0
! static const char * dependence_string [] = {"flow", "anti", "output", 
"none"};
! #endif
  enum direction_type {lt, le, eq, gt, ge, star, independent, undef};
! #if 0
! static const char * direction_string [] = {"<", "<=", "=", ">", ">=",
"*",
! 					   "INDEPENDENT", "UNDEFINED"};
! #endif
  enum def_use_type {def, use, init_def_use};
  
  enum du_status_type {seen, unseen};
--- 60,68 ----
  */
  
  enum dependence_type {dt_flow, dt_anti, dt_output, dt_none};
! 
  enum direction_type {lt, le, eq, gt, ge, star, independent, undef};
! 
  enum def_use_type {def, use, init_def_use};
  
  enum du_status_type {seen, unseen};
*************** static int find_gcd PARAMS ((int, int));
*** 211,220 ****
  static void merge_dependencies PARAMS ((enum 
direction_type[][MAX_SUBSCRIPTS],
  					int[][MAX_SUBSCRIPTS], int, int));
  static void dump_array_ref PARAMS ((tree));
- #if 0
- static void dump_one_node PARAMS ((def_use*, varray_type*));
- static void dump_node_dependence PARAMS ((void));
- #endif
  int search_dependence PARAMS ((tree));
  void remember_dest_for_dependence PARAMS ((tree));
  int have_dependence_p PARAMS ((rtx, rtx, enum direction_type[],
int[]));
--- 206,211 ----
*************** dump_array_ref (node)
*** 1298,1375 ****
        dump_array_ref (TREE_OPERAND (node, 1));
      }
  }
- 
- /* Dump def/use DU. */
- 
- #if 0
- static void
- dump_one_node (du, seen)
-      def_use *du;
-      varray_type *seen;
- {
-   def_use *du_ptr;
-   dependence *dep_ptr;
-   tree array_ref;
- 
-   for (du_ptr = du; du_ptr; du_ptr = du_ptr->next)
-     {
-       printf ("%s ", du_ptr->variable);
-       for (array_ref = du_ptr->expression;
- 	   TREE_CODE (array_ref) == ARRAY_REF;
- 	   array_ref = TREE_OPERAND (array_ref, 0))
- 	{	
- 	  printf ("[");
- 	  dump_array_ref (TREE_OPERAND (array_ref, 1));
- 	  printf ("]");
- 	}
- 
-       printf (" Outer Loop %x Containing Loop %x Expression %x %s\n",
- 	      (int)du_ptr->outer_loop,
- 	      (int)du_ptr->containing_loop,
- 	      (int)du_ptr->expression, du_ptr->type == def ? "Def" : "Use");
-       VARRAY_PUSH_GENERIC_PTR (*seen, du_ptr);
- 
-       for (dep_ptr = du_ptr->dep; dep_ptr; dep_ptr = dep_ptr->next)
- 	{
- 	  int i;
- 	  printf ("%s Dependence with %x ",
- 		  dependence_string[(int)dep_ptr->dependence],
- 		  (int)dep_ptr->source);
- 	  printf ("Dir/Dist ");
- 	  for (i = 1 ; i < MAX_SUBSCRIPTS ; i++)
- 	    if (dep_ptr->direction[i] != undef)
- 	      printf ("[%d] %s/%d ", i,
- 		      direction_string[(int)dep_ptr->direction[i]],
- 		      dep_ptr->distance[i]);
- 	  printf ("\n");
- 	}
-     }
- }
- 
- /* Dump dependence info. */
- 
- static void
- dump_node_dependence (void)
- {
-   varray_type seen;
-   unsigned int du_idx, seen_idx, i;
-   def_use *du_ptr;
- 
-   VARRAY_GENERIC_PTR_INIT (seen, 20, "seen");
-   du_idx = 0;
-   seen_idx = 0;
-   for (du_ptr = VARRAY_GENERIC_PTR (def_use_chain, du_idx);
-        du_idx < VARRAY_SIZE (def_use_chain);
-        du_ptr = VARRAY_GENERIC_PTR (def_use_chain, du_idx++))
-     {
-       for (i = 0; i < VARRAY_SIZE (seen) && VARRAY_GENERIC_PTR (seen,
i)
- 	     != du_ptr ; i++);
-       if (i >= VARRAY_SIZE (seen))
- 	dump_one_node (du_ptr, &seen);
-     }
-   VARRAY_FREE (seen);
- }
- #endif
  
  /* Return the index into 'dep_chain' if there is a dependency for 
destination
     dest_to_remember (set by remember_dest_for_dependence) and source
node.
--- 1289,1294 ----
Index: gcc/gcc/fp-test.c
===================================================================
RCS file: /data/download/gcc-cvs/gcc/gcc/fp-test.c,v
retrieving revision 1.4
diff -c -3 -p -r1.4 fp-test.c
*** gcc/gcc/fp-test.c	2000/01/24 20:10:01	1.4
--- gcc/gcc/fp-test.c	2001/06/16 08:51:35
***************
*** 26,32 ****
  
     To use this file, simply compile it (with GCC or G++) and then try
to
     link it in the normal way (also using GCC or G++ respectively).  If
!    all of the floating -point operations (including conversions) have
     been provided, then this file will link without incident.  If
however
     one or more of the primitive floating-point operations have not
been
     properly provided, you will get link-time errors indicating which
--- 26,32 ----
  
     To use this file, simply compile it (with GCC or G++) and then try
to
     link it in the normal way (also using GCC or G++ respectively).  If
!    all of the floating-point operations (including conversions) have
     been provided, then this file will link without incident.  If
however
     one or more of the primitive floating-point operations have not
been
     properly provided, you will get link-time errors indicating which
***************
*** 36,45 ****
     some system which lacks floating-point hardware, and for which
     software emulation routines (for FP ops) are needed in order to
     complete the port.  */
- 
- #if 0
- #include <math.h>
- #endif
  
  extern double acos (double);
  extern double asin (double);
--- 36,41 ----
Index: gcc/gcc/gmon.c
===================================================================
RCS file: /data/download/gcc-cvs/gcc/gcc/gmon.c,v
retrieving revision 1.6
diff -c -3 -p -r1.6 gmon.c
*** gcc/gcc/gmon.c	1999/11/22 18:40:19	1.6
--- gcc/gcc/gmon.c	2001/06/16 08:17:50
***************
*** 32,41 ****
  static char sccsid[] = "@(#)gmon.c	5.3 (Berkeley) 5/22/91";
  #endif /* not lint */
  
- #if 0
- #include <unistd.h>
- 
- #endif
  #ifdef DEBUG
  #include <stdio.h>
  #endif
--- 32,37 ----



More information about the Gcc-patches mailing list