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 of COMPOUND_EXPRs


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


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