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: [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
code?

  http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14583

Basically, we want to convert a switch to an array access if that's
profitable.

Kazu Hirata


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