Fix another crafty failure

Jan Hubicka jh@suse.cz
Mon Mar 4 06:37:00 GMT 2002


Hi,
removing dead jumptables turns out to be not enought.  In the option.i
there happends to be jumptable just before the loop and the LOOP_BEG note
is followed by jump around the jumptable.  After jumptable removal this
is a valid loop with unnecesary jump in the front.

Unroller decides that loop is not entered at the top and suceeds to confuse
himself as the rest of code expect two distinct labels - the loopback label
and the loop entry then.

It is easiest to kill those dead jumps after dead jumptable removal.
I am installing the patch as obvious to avoid build failures for people
hitting similar problem. I've received bugreports so this appears
to be more common case than I would expect.


Mon Mar  4 15:33:16 CET 2002  Jan Hubicka  <jh@suse.cz>
	* toplev.c (rest_of_compilation): Cleanup CFG after dead jumptables
	removal

Index: toplev.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/toplev.c,v
retrieving revision 1.582
diff -c -3 -p -r1.582 toplev.c
*** toplev.c	2002/03/03 21:40:38	1.582
--- toplev.c	2002/03/04 14:32:15
*************** rest_of_compilation (decl)
*** 2877,2882 ****
--- 2877,2883 ----
      {
        timevar_push (TV_LOOP);
        delete_dead_jumptables ();
+       cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_PRE_LOOP);
        open_dump_file (DFI_loop, decl);
        /* CFG is no longer maintained up-to-date.  */
        free_bb_for_insn ();



More information about the Gcc-patches mailing list