This is the mail archive of the
mailing list for the GCC project.
Re: [patch] stmt.c (emit_case_nodes): Fix optimization/9707.
> Hi Honza,
> > I have kind of plan to do this after tree-profiling branch work is
> > completted for merging. With the profile in hands we can do much better
> > work on producing the trees/jumptables, so I intend to create switch
> > lowering pass that will take current SWITCH_EXPR and turn them into "low
> > level" ones that will be either jump trees or dense switch_exprs that
> > will always compile into jumptables.
> A switch lowering pass would be nice. Do you think there is a clean
> way to sneak in the following optimization somewhere in your lowering
> Basically, we want to convert a switch to an array access if that's
I hope so. Converting such stupid switch constructs into tables was
something I wanted to do for a while :) We have few of these even in
performance critical spots in GCC.
> Kazu Hirata