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] Insert on edge comment


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


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