[tree-ssa] Switch stmts and inserting on edge
Zack Weinberg
zack@codesourcery.com
Sun Jun 1 06:41:00 GMT 2003
Chris Lattner <sabre@nondot.org> writes:
> In LLVM it's straight-forward to write target-independent transformations
> that use information about the target. In this case we could expose
> things like how sparse the switch needs to be before we break it up into a
> binary tree. Also you can use profile information to make the hot paths
> shorter, and other optimizations...
There's a whole portfolio of target-independent transformations that
it would be nice to see done on SWITCH_EXPRs at the tree level. For
instance, there's no good reason why the code generated for a plain
old switch on an opcode number should be different from the code you
get if you use the computed goto extension. For another, it would be
nifty if a switch statement every branch of which set the same
variable to a different value got turned into a single assignment to
that variable from a lookup table.
zw
More information about the Gcc
mailing list