This is the mail archive of the 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] 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.

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.

Never realized I should do this part though.
Next thing i was gonna tackle (after cleanup and bootstrap work) was trying to rewrap with WFL's in a reasonable way.


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