This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Switch stmts and inserting on edge
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Chris Lattner <sabre at nondot dot org>
- Cc: Andrew Macleod <amacleod at redhat dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: 30 May 2003 15:05:25 -0400
- Subject: Re: [tree-ssa] Switch stmts and inserting on edge
- Organization: Red Hat Canada
- References: <Pine.LNX.4.44.0305301401100.11241-100000@nondot.org>
On Fri, 2003-05-30 at 15:06, Chris Lattner wrote:
> > The problem is that SWITCH_EXPRs still have implicit semantics that are
> > getting in the way. I think this ought to be fixed by finishing Jason's
> > patch to expose SWITCH_EXPRs as explicit multi-way branches, or even
> > decision trees.
>
> FWIW, this is what LLVM does, and it works quite well. All fall-throughs
> are made into explicit gotos (the labels being merged if appropriate), and
> switch statements become multiway branches.
>
Cool. Do you guys change to decision trees if the case space is too
scattered? I think we do this in RTL, but I don't know how we decide as
there may be target constraints as well.
Diego.