[patch] Fix recent breakage in basic-block.h

Jan Hubicka jh@suse.cz
Thu Sep 13 03:04:00 GMT 2001


> Jan,
> 
> Your recent CFG cleanup removed the extern declaration for
> expunge_block needed by the tree CFG builder.

Oops, I didn't noticed that - I've just localized all functions that appeared
to be global for no purpose.

Can you follow my scheme of cleanups and just add an "cfgtree.c" that will
contain tree CFG handling functions?

Why exactly you need expunge_block? You do have an delete_block equivalent
working on tree CFG?
Perhaps it may make sense to commonize both functions so we can have common
code to operate at CFG - like delete_unreachable_blocks.

Honza
> 
> Fixed with this patch.  OK to apply?
> 
> Diego.
> 
> 
> 
> 	* basic-block.h (expunge_block): Declare.
> 	* cfg.c (expunge_block): Remove static declaration.
> 
> Index: basic-block.h
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/basic-block.h,v
> retrieving revision 1.118
> diff -d -p -d -u -p -r1.118 basic-block.h
> --- basic-block.h	2001/09/11 16:58:56	1.118
> +++ basic-block.h	2001/09/12 16:42:05
> @@ basic-block.h			PARAMS ((regse
>  extern void debug_regset		PARAMS ((regset));
>  extern void allocate_reg_life_data      PARAMS ((void));
>  extern void allocate_bb_life_data	PARAMS ((void));
> +extern void expunge_block		PARAMS ((basic_block));
>  extern void find_unreachable_blocks	PARAMS ((void));
>  extern void delete_noop_moves		PARAMS ((rtx));
>  extern basic_block redirect_edge_and_branch_force PARAMS ((edge, basic_block));
> Index: cfg.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/cfg.c,v
> retrieving revision 1.3
> diff -d -p -d -u -p -r1.3 cfg.c
> --- cfg.c	2001/09/11 16:58:57	1.3
> +++ cfg.c	2001/09/12 16:42:06
> @@ cfg.c		PARAMS ((r
>  static int can_delete_label_p		PARAMS ((rtx));
>  static void commit_one_edge_insertion	PARAMS ((edge));
>  static bool try_redirect_by_replacing_jump PARAMS ((edge, basic_block));
> -static void expunge_block		PARAMS ((basic_block));
>  static rtx last_loop_beg_note		PARAMS ((rtx));
>  static bool back_edge_of_syntactic_loop_p PARAMS ((basic_block, basic_block));
>  static basic_block force_nonfallthru_and_redirect PARAMS ((edge, basic_block));
> @@ -439,7 +438,7 @@ create_basic_block (index, head, end)
>  
>  /* Remove block B from the basic block array and compact behind it.  */
>  
> -static void
> +void
>  expunge_block (b)
>       basic_block b;
>  {



More information about the Gcc-patches mailing list