This is the mail archive of the gcc-patches@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] Make tsi insert iterators handle chains ofCOMPOUND_EXPRs


On Thu, 2003-08-28 at 17:43, Zdenek Dvorak wrote:
> Hello,
> 

> > 
> > I would prefer to see us handle inserting a chain of stmts with a
> > different link routine. Implementing it your way presumes that a tree
> > can points to a list of stmt's, which it happens to now because of the
> > whole COMPOUND_EXPR concept. If we change this down the road and the
> > linking mechamism is no longer contained in the tree node, we'll have to
> > look at all the uses of tree_insert_* and determine whether we need to
> > use the stmt_list version or the single stmt version. 
> 
> I believe this is not an issue; if we do this change, it will be on
> block_stmt_iterator level, while tree_stmt_iterators will remain useful
> for iterating over trees that are generated in the early stages.
> 
> However if you insist, I may give the function a different name.
> 

We've had discussion of changing the way tree's are linked, not just
when there is a CFG present. Instead of COMPOUND_EXPR's we'd use doubly
linked lists. rth has a promising scheme which removes the links from
the tree node itself, and holds the links in a different data
structure.  We've just been trying to preserve the abstraction at our
level as much as possible to allow something like this to happen at
least a little more painlessly down the road... should anyone ever get
really energetic :-) The iterators would then traverse the other data
structure instead of tree's, and the *_stmt() routines would give us the
stmt trees.

With that in mind, I'd prefer to see linking multiple stmt chains done
through a different routine. It should actually be slightly easier to
implement since you dont have to worry about affecting current behaviour
in the absence of a CE node.

Andrew 


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