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]

Re: Hookize CFG debugging code


Jan,

> > The test was for PR optimization/10024.
> 
> It looks like I've messed up the degenerated condjumps again.
> Does this patch help?

The patch below fixes the problem with the addition of a zero
initializer for `fallthru'.  Will you please submit for approval?

Thanks,
Dave

> I have to think deeper about some nice sollution to this problem.
> 
> Thanks,
> Honza
> 
> Index: cfgrtl.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/cfgrtl.c,v
> retrieving revision 1.81
> diff -c -3 -p -r1.81 cfgrtl.c
> *** cfgrtl.c	13 Jun 2003 22:56:09 -0000	1.81
> --- cfgrtl.c	20 Jun 2003 17:14:42 -0000
> *************** rtl_verify_flow_info_1 ()
> *** 1765,1771 ****
>     FOR_EACH_BB_REVERSE (bb)
>       {
>         int n_fallthru = 0, n_eh = 0, n_call = 0, n_abnormal = 0, n_branch = 0;
> !       edge e;
>         rtx note;
>   
>         if (INSN_P (bb->end)
> --- 1765,1771 ----
>     FOR_EACH_BB_REVERSE (bb)
>       {
>         int n_fallthru = 0, n_eh = 0, n_call = 0, n_abnormal = 0, n_branch = 0;
> !       edge e, fallthru;
>         rtx note;
>   
>         if (INSN_P (bb->end)
> *************** rtl_verify_flow_info_1 ()
> *** 1783,1789 ****
>         for (e = bb->succ; e; e = e->succ_next)
>   	{
>   	  if (e->flags & EDGE_FALLTHRU)
> ! 	    n_fallthru++;
>   
>   	  if ((e->flags & ~(EDGE_DFS_BACK | EDGE_CAN_FALLTHRU | EDGE_IRREDUCIBLE_LOOP)) == 0)
>   	    n_branch++;
> --- 1783,1789 ----
>         for (e = bb->succ; e; e = e->succ_next)
>   	{
>   	  if (e->flags & EDGE_FALLTHRU)
> ! 	    n_fallthru++, fallthru = e;
>   
>   	  if ((e->flags & ~(EDGE_DFS_BACK | EDGE_CAN_FALLTHRU | EDGE_IRREDUCIBLE_LOOP)) == 0)
>   	    n_branch++;
> *************** rtl_verify_flow_info_1 ()
> *** 1822,1828 ****
>   	  err = 1;
>   	}
>         if (n_branch != 1 && any_condjump_p (bb->end)
> ! 	  && JUMP_LABEL (bb->end) != bb->next_bb->head)
>   	{
>   	  error ("Wrong amount of branch edges after conditional jump %i", bb->index);
>   	  err = 1;
> --- 1822,1828 ----
>   	  err = 1;
>   	}
>         if (n_branch != 1 && any_condjump_p (bb->end)
> ! 	  && JUMP_LABEL (bb->end) != fallthru->dest->head)
>   	{
>   	  error ("Wrong amount of branch edges after conditional jump %i", bb->index);
>   	  err = 1;
> 


-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)


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