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: flow.c sanity check


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


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