This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: flow.c sanity check
- From: Andreas Jaeger <aj at suse dot de>
- To: Jan Hubicka <jh at suse dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, rth at cygnus dot com
- Date: Thu, 28 Mar 2002 19:58:23 +0100
- Subject: Re: flow.c sanity check
- References: <20020328182135.GH3987@atrey.karlin.mff.cuni.cz>
Jan Hubicka <jh@suse.cz> writes:
> Hi,
> calling update_life_info with nonzeroed aux fields creates all sord of weird
> effects, so it is worthwhile to sanity check this. Fixes are following.
>
> Honza
>
> Thu Mar 28 19:13:07 CET 2002 Jan Hubicka <jh@suse.cz>
> * flow.c (calculate_global_regs_live): Ensure that all AUX fields are NULL.
> Index: flow.c
> ===================================================================
> RCS file: /cvs/gcc/egcs/gcc/flow.c,v
> retrieving revision 1.512
> diff -c -3 -p -r1.512 flow.c
> *** flow.c 2002/03/22 19:54:34 1.512
> --- flow.c 2002/03/28 18:04:27
> *************** calculate_global_regs_live (blocks_in, b
> *** 1071,1076 ****
> --- 1071,1086 ----
> regset_head new_live_at_end_head;
> int i;
>
> + /* Some passes used to forget clear aux field of basic block causing
> + sick behaviour here. */
What about the following comment:
/* Some passes forget to clear the aux field of basic blocks. Since this
function expects the fields to be cleared and if not does not work,
let's check for it. */
Andreas
> + #ifdef ENABLE_CHECKING
> + if (ENTRY_BLOCK_PTR->aux || EXIT_BLOCK_PTR->aux)
> + abort ();
> + for (i = 0; i < n_basic_blocks; i++)
> + if (BASIC_BLOCK (i)->aux)
> + abort ();
> + #endif
> +
> tmp = INITIALIZE_REG_SET (tmp_head);
> new_live_at_end = INITIALIZE_REG_SET (new_live_at_end_head);
> call_used = INITIALIZE_REG_SET (call_used_head);
>
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj