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: [tree-ssa] Cfghooks cleanup


On Sun, Jan 11, 2004 at 09:01:00PM +0100, Zdenek Dvorak wrote:
> this patch cleans up the mess in cfg manipulation functions a bit:

I like most everything about this patch, except for some 
gratuitous allocations of empty stmt_lists.

> *************** make_blocks (tree stmt_list)
> *** 332,338 ****
>   	{
>   	  if (!first_stmt_of_list)
>   	    stmt_list = tsi_split_statement_list_before (&i);
> - 	  bb = create_bb (stmt_list, bb);
> + 	  bb = create_empty_bb (bb);
> + 	  bb->stmt_list = stmt_list;

Here, for instance,

> ! create_bb (void *h, void *e, basic_block after)
>   {
>     basic_block bb;
>   
> +   if (h || e)
> +     abort ();

We could easily make H carry the list and have E be always NULL.

Change that and the patch is ok.


r~


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