This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Make tsi insert iterators handle chains of COMPOUND_EXPRs
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: Andrew MacLeod <amacleod at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Jeff Law <law at redhat dot com>
- Date: Thu, 28 Aug 2003 23:43:24 +0200
- Subject: Re: [tree-ssa] Make tsi insert iterators handle chains of COMPOUND_EXPRs
- References: <20030828195323.GA19202@atrey.karlin.mff.cuni.cz> <1062104028.2564.13.camel@p4>
Hello,
> > this patch improves tsi_link_before and tsi_link_after so that if
> > the statement you link in is right-recursive chain of COMPOUND_EXPRs,
> > rationalize_compound_expr does not have to be called.
> >
> > This enables to remove creation of BIND_EXPR from replace_stmt.
>
>
> 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.
Zdenek