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] passes.c: Remove a cut-n-paste error.


Hi,

Attached is a patch to remove a cut-n-paste error.

If you look at the patch, it's obvious that there is the same code
repeated twice.  I don't know the gory details about those functions
called within the "if" statement, but none of them seems to require
two iterations as far as I can tell from their function names.

This error seems to have been introduced in

http://gcc.gnu.org/ml/gcc-patches/2004-06/msg01633.html

The patch simply removes the second copy.

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

Kazu Hirata

2004-11-04  Kazu Hirata  <kazu@cs.umass.edu>

	* passes.c (rest_of_handle_jump): Remove a cut-n-paste error.

Index: passes.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/passes.c,v
retrieving revision 2.52
diff -U11 -d -p -r2.52 passes.c
--- passes.c	25 Sep 2004 10:05:09 -0000	2.52
+++ passes.c	4 Nov 2004 00:44:00 -0000
@@ -1294,32 +1294,22 @@ rest_of_handle_jump (void)
   /* ??? We may get called either via tree_rest_of_compilation when the CFG
      is already built or directly (for instance from coverage code).
      The direct callers shall be updated.  */
   if (!basic_block_info)
     {
       init_flow ();
       rebuild_jump_labels (get_insns ());
       find_exception_handler_labels ();
       find_basic_blocks (get_insns (), max_reg_num (), dump_file);
     }
 
-  /* ??? We may get called either via tree_rest_of_compilation when the CFG
-     is already built or directly (for instance from coverage code).
-     The direct callers shall be updated.  */
-  if (!basic_block_info)
-    {
-      init_flow ();
-      rebuild_jump_labels (get_insns ());
-      find_exception_handler_labels ();
-      find_basic_blocks (get_insns (), max_reg_num (), dump_file);
-    }
   delete_unreachable_blocks ();
 #ifdef ENABLE_CHECKING
   verify_flow_info ();
 #endif
 
   if (cfun->tail_call_emit)
     fixup_tail_calls ();
 
   close_dump_file (DFI_sibling, print_rtl, get_insns ());
   timevar_pop (TV_JUMP);
 }


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