[Mono-devel-list] Removal of critical edges

Massimiliano Mantione massi at ximian.com
Wed Nov 17 08:24:56 EST 2004


On Wed, 2004-11-17 at 03:50, Ben Maurer wrote:
> +//					new_bb->real_offset = bb->real_offset;
> It looks like this code is not used after we read the IL code. So, probably not needed.

OK, I leave it commented.

> +//					new_bb->region = bb->region;
> 
> region should == 0 in the code that you are doing, because you do not
> handle exception clauses.

Yes, but suppose I did (or suppose in the future we will)...
what should I put in the region field then?

> +//						jump->cil_code = bb->cil_code;
> This is probably needed for debugging. But am not sure.

OK, I'll uncomment it.

> Did you try make bootstrap on a clean tree? I often catch more errors
> this way.

Well, thanks... I tried this morning, and it *did* catch one more
problem... thanks also to Paolo for telling me about OP_CALL_HANDLER
instructions on IRC.
The new attached patch is able to do a clean bootstrap.

Any comments on why we have methods containing OP_CALL_HANDLER and
with SSA still enabled?

> I think you need to maintain cfg->bblocks.

Well, actually I do... in my patch it is allocated *after* I call
remove_critical_edges.
This works because optimize_branches does not use it, so it can
safely be called *before* remove_critical_edges (which saved me the
trouble of modifying optimize_branches to be able to not introduce
critical edges in its transformations...).

Thanks a lot for the input!

Ciao,
  Massi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: critical-edges-removal.patch
Type: text/x-patch
Size: 5059 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20041117/016f3b17/attachment.bin 


More information about the Mono-devel-list mailing list