This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Language-independent functions-as-trees representation
- From: Jason Merrill <jason at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 02 Sep 2002 14:03:41 -0700
- Subject: Re: Language-independent functions-as-trees representation
- References: <wvllm86k1m1.fsf@prospero.cambridge.redhat.com><wvl65y1px1j.fsf@prospero.cambridge.redhat.com><20020829211043.GB549@redhat.com>
On Thu, 29 Aug 2002 14:10:43 -0700, Richard Henderson <rth@redhat.com> wrote:
> On Fri, Aug 23, 2002 at 01:41:28PM +0100, Jason Merrill wrote:
>> rth has raised some questions about the advisability of using COMPOUND_EXPR
>> to chain statements; the current scheme uses TREE_CHAIN of the statements
>> themselves.
> Perhaps this can be deferred for now by creating some
> FOR_EACH_STMT (STMT, START) macros that do the iteration. Then we
> can replace the iteration implementation more easily later.
Indeed, I've already added a foreach_stmt function to c-simplify.c on the
bnw-simple-branch.
> Speaking of CASE_LABEL, one way to fix that would be to have the
> SWITCH_EXPR have a vector that mapped indices to plain old LABEL_EXPRs.
> Thoughts here? Perhaps I am making too much work for the front end?
I was just talking about giving it an optional vector of case labels; I
think it would make sense for the simplifier to lower CASE_LABELs to
LABEL_EXPRs and build up that vector.
Jason