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] Remove renumber_insns and flag_renumber_insns.


Hi,

Attached is a patch to remove renumber_insns and flag_renumber_insns
as they are unused.

It seems that Steven removed the last use in:

2007-01-27  Steven Bosscher  <steven@gcc.gnu.org>

	* tracer.c (rest_of_handle_tracer): We already cleaned
	up the CFG in tracer() so don't do it here again.
	* cfgcleanup.c (rest_of_handle_jump2): Don't repeat
	cleanup_cfg here, either.  And don't call renumber_insns.

There was no mention of this flag in the documentation.

Bootstrapped on i686-pc-linux-gnu.  OK to apply?

Kazu Hirata

2007-02-02  Kazu Hirata  <kazu@codesourcery.com>

	* emit-rtl.c (renumber_insns): Remove.
	* flags.h: Remove the extern for flag_renumber_insns.
	* rtl.h: Remove the prototype for renumber_insns.
	* toplev.c (flag_renumber_insns): Remove.

Index: emit-rtl.c
===================================================================
--- emit-rtl.c	(revision 121507)
+++ emit-rtl.c	(working copy)
@@ -2806,33 +2806,6 @@ get_max_uid (void)
 {
   return cur_insn_uid;
 }
-
-/* Renumber instructions so that no instruction UIDs are wasted.  */
-
-void
-renumber_insns (void)
-{
-  rtx insn;
-
-  /* If we're not supposed to renumber instructions, don't.  */
-  if (!flag_renumber_insns)
-    return;
-
-  /* If there aren't that many instructions, then it's not really
-     worth renumbering them.  */
-  if (flag_renumber_insns == 1 && get_max_uid () < 25000)
-    return;
-
-  cur_insn_uid = 1;
-
-  for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
-    {
-      if (dump_file)
-	fprintf (dump_file, "Renumbering insn %d to %d\n",
-		 INSN_UID (insn), cur_insn_uid);
-      INSN_UID (insn) = cur_insn_uid++;
-    }
-}
 
 /* Return the next insn.  If it is a SEQUENCE, return the first insn
    of the sequence.  */
Index: flags.h
===================================================================
--- flags.h	(revision 121507)
+++ flags.h	(working copy)
@@ -187,11 +187,6 @@ extern int flag_debug_asm;
 extern int flag_next_runtime;
 
 extern int flag_dump_rtl_in_asm;
-
-/* If one, renumber instruction UIDs to reduce the number of
-   unused UIDs if there are a lot of instructions.  If greater than
-   one, unconditionally renumber instruction UIDs.  */
-extern int flag_renumber_insns;
 
 /* Other basic status info about current function.  */
 
Index: rtl.h
===================================================================
--- rtl.h	(revision 121507)
+++ rtl.h	(working copy)
@@ -2059,7 +2059,6 @@ extern void add_insn_before (rtx, rtx);
 extern void add_insn_after (rtx, rtx);
 extern void remove_insn (rtx);
 extern rtx emit (rtx);
-extern void renumber_insns (void);
 extern rtx delete_insn (rtx);
 extern rtx entry_of_function (void);
 extern void emit_insn_at_entry (rtx);
Index: toplev.c
===================================================================
--- toplev.c	(revision 121507)
+++ toplev.c	(working copy)
@@ -333,11 +333,6 @@ int flag_dump_rtl_in_asm = 0;
    the support provided depends on the backend.  */
 rtx stack_limit_rtx;
 
-/* If one, renumber instruction UIDs to reduce the number of
-   unused UIDs if there are a lot of instructions.  If greater than
-   one, unconditionally renumber instruction UIDs.  */
-int flag_renumber_insns = 1;
-
 /* Nonzero if we should track variables.  When
    flag_var_tracking == AUTODETECT_VALUE it will be set according
    to optimize, debug_info_level and debug_hooks in process_options ().  */


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