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]

Re: Another bug in your lastest checkin.


> > >         set_block_for_new_insns (emit_insn_after (seq, f),
> > >                                  ENTRY_BLOCK_PTR->succ);
> > >                                ^requires BB and not EDGE!
> > Hmm, the change came from sanity checking every emit_insn, but after
> > closer look, it looks like the code is dead now.  We always do have CFG
> > built (even when not optimizing) and so we always excercise the first
> > part of if.
> > 
> > Richard, looks sane to just remove the the if?
> >
> If it is always now supposed to execute the if part then I would
> suggest you change the code to keep a sanity check, thus:
I've just sucesfully finished testing of following on i586.

OK?


Tue Jul 31 15:05:01 CEST 2001  Graham Stott  <grahams@redhat.com>
			       Jan Hubicka  <jh@suse.cz>

	* function.c (thread_prologue_and_epilogue_insns): Kill code
	dealing with non-existent CFG.

Index: function.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/function.c,v
retrieving revision 1.286
diff -c -3 -p -r1.286 function.c
*** function.c	2001/07/30 20:30:20	1.286
--- function.c	2001/07/31 13:02:37
*************** thread_prologue_and_epilogue_insns (f)
*** 7214,7233 ****
        seq = gen_sequence ();
        end_sequence ();
  
!       /* If optimization is off, and perhaps in an empty function,
! 	 the entry block will have no successors.  */
!       if (ENTRY_BLOCK_PTR->succ)
! 	{
! 	  /* Can't deal with multiple successsors of the entry block.  */
! 	  if (ENTRY_BLOCK_PTR->succ->succ_next)
! 	    abort ();
  
! 	  insert_insn_on_edge (seq, ENTRY_BLOCK_PTR->succ);
! 	  inserted = 1;
! 	}
!       else
! 	set_block_for_new_insns (emit_insn_after (seq, f),
! 		       		 ENTRY_BLOCK_PTR->succ);
      }
  #endif
  
--- 7214,7227 ----
        seq = gen_sequence ();
        end_sequence ();
  
!       /* Can't deal with multiple successsors of the entry block
!          at the moment.  Function should always have at least one
!          entry point.  */
!       if (!ENTRY_BLOCK_PTR->succ || ENTRY_BLOCK_PTR->succ->succ_next)
! 	abort ();
  
!       insert_insn_on_edge (seq, ENTRY_BLOCK_PTR->succ);
!       inserted = 1;
      }
  #endif
  


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