This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] RFC: Making control flow more explicit
- From: Chris Lattner <sabre at nondot dot org>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Diego Novillo <dnovillo at redhat dot com>, <gcc at gcc dot gnu dot org>
- Date: Thu, 7 Aug 2003 17:00:00 -0500 (CDT)
- Subject: Re: [tree-ssa] RFC: Making control flow more explicit
Richard Henderson Said:
> I'd be surprised if we could do as well if we lower this to ifs.
> I think we probably want to keep a multi-way branch until rtl.
> But something more like
> multi-goto [ 1: label1, 2: label2, 3: label3, else: label4 ];
> than a switch statement per-se. You could still use SWITCH_EXPR,
> probably, so long as all the labels and values are collected in
> the node.
For what it's worth, this is what we do in LLVM, and it works quite well.
At the codegen/RTL emission stage you can decide whether you want to emit
a tablejump or decision tree...
-Chris
--
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/