Remove unused parameter in cfgrtl.c

Andreas Jaeger aj@suse.de
Sat Jun 8 06:29:00 GMT 2002


With recent changes, the max parameter for compute_bb_for_insn is not
used anymore.

Ok to commit the appended patch?  Regtested/bootstrapped on
i686-linux-gnu,

Andreas

2002-06-08  Andreas Jaeger  <aj@suse.de>

	* cfgrtl.c (compute_bb_for_insn): Remove unused parameter.
	* basic-block.h: Adjust prototype.
	* haifa-sched.c (sched_init): Fix caller.
	* sched-ebb.c (schedule_ebbs): Likewise.
	* sched-rgn.c (schedule_insns): Likewise.
	* ssa-ccp.c (ssa_const_prop): Likewise.
	* ssa-dce.c (ssa_eliminate_dead_code): Likewise.
	* toplev.c (rest_of_compilation): Likewise.
	(rest_of_compilation): Likewise.
	* cfgbuild.c (find_basic_blocks): Likwise, remove unused var.
	* config/ia64/ia64.c (ia64_reorg): Likewise.

============================================================
Index: gcc/cfgbuild.c
--- gcc/cfgbuild.c	2 Jun 2002 21:09:10 -0000	1.22
+++ gcc/cfgbuild.c	8 Jun 2002 10:13:46 -0000
@@ -1,6 +1,6 @@
 /* Control flow graph building code for GNU compiler.
    Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001 Free Software Foundation, Inc.
+   1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -612,7 +612,6 @@ find_basic_blocks (f, nregs, file)
      int nregs ATTRIBUTE_UNUSED;
      FILE *file ATTRIBUTE_UNUSED;
 {
-  int max_uid;
   basic_block bb;
 
   timevar_push (TV_CFG);
@@ -653,14 +652,7 @@ find_basic_blocks (f, nregs, file)
      tagged directly with the basic block that it starts.  It is used for
      more than that currently, but IMO that is the only valid use.  */
 
-  max_uid = get_max_uid ();
-#ifdef AUTO_INC_DEC
-  /* Leave space for insns life_analysis makes in some cases for auto-inc.
-     These cases are rare, so we don't need too much space.  */
-  max_uid += max_uid / 10;
-#endif
-
-  compute_bb_for_insn (max_uid);
+  compute_bb_for_insn ();
 
   /* Discover the edges of our cfg.  */
   make_edges (label_value_list, ENTRY_BLOCK_PTR->next_bb, EXIT_BLOCK_PTR->prev_bb, 0);
============================================================
Index: gcc/cfgrtl.c
--- gcc/cfgrtl.c	2 Jun 2002 21:09:12 -0000	1.55
+++ gcc/cfgrtl.c	8 Jun 2002 10:13:47 -0000
@@ -424,11 +424,10 @@ flow_delete_block (b)
 }
 
 /* Records the basic block struct in BB_FOR_INSN, for every instruction
-   indexed by INSN_UID.  MAX is the size of the array.  */
+   indexed by INSN_UID.  */
 
 void
-compute_bb_for_insn (max)
-     int max;
+compute_bb_for_insn ()
 {
   basic_block bb;
 
============================================================
Index: gcc/basic-block.h
--- gcc/basic-block.h	4 Jun 2002 07:06:52 -0000	1.152
+++ gcc/basic-block.h	8 Jun 2002 10:13:47 -0000
@@ -306,7 +306,7 @@ extern struct basic_block_def entry_exit
 #define BLOCK_NUM(INSN)	      (BLOCK_FOR_INSN (INSN)->index + 0)
 #define set_block_for_insn(INSN, BB)  (BLOCK_FOR_INSN (INSN) = BB)
 
-extern void compute_bb_for_insn		PARAMS ((int));
+extern void compute_bb_for_insn		PARAMS ((void));
 extern void free_bb_for_insn		PARAMS ((void));
 extern void update_bb_for_insn		PARAMS ((basic_block));
 
============================================================
Index: gcc/haifa-sched.c
--- gcc/haifa-sched.c	4 Jun 2002 17:46:14 -0000	1.208
+++ gcc/haifa-sched.c	8 Jun 2002 10:13:48 -0000
@@ -2368,7 +2368,7 @@ sched_init (dump_file)
 
   init_dependency_caches (luid);
 
-  compute_bb_for_insn (old_max_uid);
+  compute_bb_for_insn ();
 
   init_alias_analysis ();
 
============================================================
Index: gcc/sched-ebb.c
--- gcc/sched-ebb.c	2 Jun 2002 21:09:47 -0000	1.15
+++ gcc/sched-ebb.c	8 Jun 2002 10:13:49 -0000
@@ -291,7 +291,7 @@ schedule_ebbs (dump_file)
   current_sched_info = &ebb_sched_info;
 
   allocate_reg_life_data ();
-  compute_bb_for_insn (get_max_uid ());
+  compute_bb_for_insn ();
 
   /* Schedule every region in the subroutine.  */
   FOR_EACH_BB (bb)
============================================================
Index: gcc/sched-rgn.c
--- gcc/sched-rgn.c	2 Jun 2002 21:09:47 -0000	1.44
+++ gcc/sched-rgn.c	8 Jun 2002 10:13:50 -0000
@@ -3016,7 +3016,7 @@ schedule_insns (dump_file)
      best way to test for this kind of thing...  */
 
   allocate_reg_life_data ();
-  compute_bb_for_insn (get_max_uid ());
+  compute_bb_for_insn ();
 
   any_large_regions = 0;
   large_region_blocks = sbitmap_alloc (last_basic_block);
============================================================
Index: gcc/ssa-ccp.c
--- gcc/ssa-ccp.c	27 May 2002 13:45:43 -0000	1.23
+++ gcc/ssa-ccp.c	8 Jun 2002 10:13:51 -0000
@@ -992,7 +992,7 @@ ssa_const_prop ()
 	      DF_RD_CHAIN | DF_RU_CHAIN | DF_REG_INFO | DF_HARD_REGS);
 
   /* We need mappings from insn to its containing block.  */
-  compute_bb_for_insn (get_max_uid ());
+  compute_bb_for_insn ();
 
   /* Perform a quick and dirty dead code elimination pass.  This is not
      as aggressive as it could be, but it's good enough to clean up a
============================================================
Index: gcc/ssa-dce.c
--- gcc/ssa-dce.c	4 Jun 2002 07:07:55 -0000	1.19
+++ gcc/ssa-dce.c	8 Jun 2002 10:13:51 -0000
@@ -500,8 +500,6 @@ ssa_eliminate_dead_code ()
   int *pdom;
   struct edge_list *el;
 
-  int max_insn_uid = get_max_uid ();
-
   /* Initialize the data structures.  */
   mark_all_insn_unnecessary ();
   VARRAY_RTX_INIT (unprocessed_instructions, 64,
@@ -511,7 +509,7 @@ ssa_eliminate_dead_code ()
   /* Prepare for use of BLOCK_NUM ().  */
   connect_infinite_loops_to_exit ();
    /* Be careful not to clear the added edges.  */
-  compute_bb_for_insn (max_insn_uid);
+  compute_bb_for_insn ();
 
   /* Compute control dependence.  */
   pdom = (int *) xmalloc (last_basic_block * sizeof (int));
============================================================
Index: gcc/toplev.c
--- gcc/toplev.c	6 Jun 2002 01:25:14 -0000	1.645
+++ gcc/toplev.c	8 Jun 2002 10:13:53 -0000
@@ -2750,7 +2750,7 @@ rest_of_compilation (decl)
      we'll save big on memory.  */
   renumber_insns (rtl_dump_file);
   if (optimize)
-    compute_bb_for_insn (get_max_uid ());
+    compute_bb_for_insn ();
   timevar_pop (TV_JUMP);
 
   close_dump_file (DFI_jump, print_rtl_with_bb, insns);
@@ -2798,7 +2798,7 @@ rest_of_compilation (decl)
       /* The second pass of jump optimization is likely to have
          removed a bunch more instructions.  */
       renumber_insns (rtl_dump_file);
-      compute_bb_for_insn (get_max_uid ());
+      compute_bb_for_insn ();
 
       timevar_pop (TV_CSE);
       close_dump_file (DFI_cse, print_rtl_with_bb, insns);
============================================================
Index: gcc/config/ia64/ia64.c
--- gcc/config/ia64/ia64.c	4 Jun 2002 18:01:16 -0000	1.174
+++ gcc/config/ia64/ia64.c	8 Jun 2002 10:13:57 -0000
@@ -6933,7 +6933,7 @@ ia64_reorg (insns)
 {
   /* We are freeing block_for_insn in the toplev to keep compatibility
      with old MDEP_REORGS that are not CFG based.  Recompute it now.  */
-  compute_bb_for_insn (get_max_uid ());
+  compute_bb_for_insn ();
 
   /* If optimizing, we'll have split before scheduling.  */
   if (optimize == 0)

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj



More information about the Gcc-patches mailing list