This is the mail archive of the gcc@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] C++ CFG issue


On Mon, 17 Mar 2003 14:05:45 -0700, law at redhat dot com wrote:

>  >>   If the second operand is simple enough and safe for reevaluation,
>  >>   then a copy of the second operand would be inserted before any jumps
>  >>   out of the subtree in the first operand.
>  >
>  >This is what we do currently.  I think it makes more sense to move the
>  >cleanups to the edge destination rather than the source; for one thing,
>  >there will be no more jump targets than jumps.

> That can't work unless you know that the edge destination is only reachable
> from one TRY_CATCH_EXPR.

You would need to split the destination label to deal with multiple
incoming edges, but I think that's a pretty standard code motion technique.

> What we *really* want is to insert this code on the edge itself, leaving
> it to the edge insertion code to determine if it belongs in the caller,
> callee or in a new block.

Yep.

> The problem is I don't think our current edge insertion code is really
> prepared to deal with insertion of an arbitrary subtree on an edge.

One thing you'll need to deal with if you add the cleanup code before the
jump is fixup regions (search for fixup in except.c); throwing from the
cleanup should not run the cleanup again.

Jason


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