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]

Re: [PATCH] Optimize tablejumps for switch statements


On Wed, Oct 24, 2001 at 11:31:01AM -0600, Roger Sayle wrote:
> 	* stmt.c (expand_end_case): Index jumptables from zero for
> 	suitably small values of minval.

Applied.

> +               if (! optimize_size
> +                   && compare_tree_int (minval, 0) > 0
> +                   && compare_tree_int (minval, 3) < 0
> +                   && compare_tree_int (maxval, 0) >= 0)

I don't think there's any need to check maxval, since
we know that maxval >= minval.


r~


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