This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Insert on edge comment
- From: Pop Sébastian <pop at gauvain dot u-strasbg dot fr>
- To: Andrew MacLeod <amacleod at redhat dot com>
- Cc: David Edelsohn <dje at watson dot ibm dot com>, Jeff Law <law at redhat dot com>,Chris Lattner <sabre at nondot dot org>, vmakarov at redhat dot com, matz at suse dot de,gcc mailing list <gcc at gcc dot gnu dot org>
- Date: Mon, 2 Jun 2003 21:20:42 +0200
- Subject: Re: [tree-ssa] Insert on edge comment
- References: <200306021752.NAA09554@makai.watson.ibm.com> <1054577798.3054.198.camel@p4>
On Mon, Jun 02, 2003 at 02:16:38PM -0400, Andrew MacLeod wrote:
> We'd like feedback from any and all of those groups as to their current
> and future experiences with trying to do loop work on our
> infrastructure...
>
>From my experience, there is no longer need to have expressions for
"controlling" the flow in the CFG once we have built the CFG.
I think that during the CFG construction we should switch from the tree
structure of the program to the CFG structure, where a control expression
no longer contains in its operands the rest of the instructions, but
we let the CFG keep track of this kind of information.
IMO, we still need things like:
- if_expr that contains its then_clause and else_clause,
- switch_expr that contains its array of cases,
- loop_expr that contains its loop body,
- ...
only for the expand to rtl purposes...
If we think in terms of containers (a BB contains a list of expressions
that are evaluated from the first to the last) we no longer need the
operands of the control expressions. A switch_expr could be placed in
end of a block bb0, and the CFG will keep track of the rest of the
information, that is: the block bb0 has as successors bb1, bb2, ..., bbk.
This is the facet of "instruction stream controlled by the CFG", rather
than the classic view of "trees over which we keep up to date the CFG".
If I'm not wrong this is still one of the major advantages of the
representation that LLVM has over the current status of tree-ssa. Chris?
...making the CFG a central representation will lead us again to consider
the old expanders to rtl. They'll no longer have to deal with control
expressions, but they'll start by walking the CFG and for each BB they
will expand the instruction stream into rtl.
Sebastian