This is the mail archive of the gcc@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: [tree-ssa] Switch stmts and inserting on edge


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


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