This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa] empty_stmt_nodes, deleted statements, iterators, and gsi_step_bb
- From: Daniel Berlin <dberlin at dberlin dot org>
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: Andrew MacLeod <amacleod at redhat dot com>,gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 29 Nov 2002 13:28:29 -0500
- Subject: Re: [tree-ssa] empty_stmt_nodes, deleted statements, iterators, and gsi_step_bb
On Friday, November 29, 2002, at 01:17 PM, Diego Novillo wrote:
On Fri, 29 Nov 2002, Daniel Berlin wrote:
On Friday, November 29, 2002, at 12:50 PM, Diego Novillo wrote:
On Fri, 29 Nov 2002, Andrew Macleod wrote:
So why does the builder do this? why doesn't it do something such as
link a compound statement into the tree, hang an empty_stmt node off
and then point to that?
Because the CFG builder is not particularly bright. Your
suggestion sounds good to me. Care to implement it? :)
You have to hang two, no?
Hmm, maybe, but I wouldn't have thought it to be necessary. I
really haven't given much thought to it yet. In principle,
inserting a statement is a matter of
1- Create a COMPOUND_EXPR containing the new statement (N) and
the old statement (O). The relative order between N and O
depends on whether you want to insert before or after.
2- Replace O with the new COMPOUND_EXPR.
This is what i do to insert in SSAPRE.
Never realized I should do this part though.
You can then call one of the gimplifier functions to re-chain the
function (rationalize_compound_expr) so that the chain is
made right associative.
Next thing i was gonna tackle (after cleanup and bootstrap work) was
trying to rewrap with WFL's in a reasonable way.