c/7344: performance regression on huge case statements

Jan Hubicka jh@suse.cz
Tue Oct 15 12:08:00 GMT 2002


> Jan,
> 
> This hunk:
> 
> *** expr.c	7 Oct 2002 07:37:09 -0000	1.486
> --- expr.c	11 Oct 2002 14:49:57 -0000
> *************** do_tablejump (index, mode, range, table_
> *** 10941,10946 ****
> --- 10930,10938 ----
>        enum machine_mode mode;
>   {
>     rtx temp, vector;
> + 
> +   if (range > cfun->max_jumptable_ents)
> +     cfun->max_jumptable_ents = range;
> 
> can't be right, `range' is an rtx and ->max_jumptable_ents is an int.

I will fix that.  Thanks!

Honza
> 
> It causes a warning regression in gcc (and a hard error with irix6-cc.)
> 
> 		--Kaveh
> 
> PS: Geoff, an automated warning regression checker would have caught
> this... ;-)
> 
> --
> Kaveh R. Ghazi			ghazi@caip.rutgers.edu



More information about the Gcc-bugs mailing list