[Mono-devel-list] Removal of critical edges

Massimiliano Mantione massi at ximian.com
Tue Nov 16 15:42:48 EST 2004


Hi,
I send this patch for review because it is a prerequisite
for committing SSAPRE.

When SSAPRE will be in, the condition for activating this
code will not be "! (cfg->disable_ssa)" (like it is now),
but "cfg->opt & MONO_OPT_SSAPRE" (plus anything that needs
critical edges removal, of course).

I especially seek comments on the three commented lines in
remove_critical_edges, what's the issue if those fields are
not set?
Also, I know that bb will never end with a CEE_BR (the edge
could not be critical), but I included it on the switch for
completeness... maybe that switch could be turned into an
utility that should complement the existing replace_out_block
(which does not touch the bb code, and only works on out_bb).
Does anybody think it would be better to factor that switch
out in an utility function?

In any case, this code is debugged and seems correct, in the
sense that it passes a 'make rcheck' with no regressions.
However, I noticed that the second pass of optimize_branches
is not able to fully "undo" the removal of critical edges,
which is not nice.
I'll see if changing the placement of the added BB makes
things better, or I'll see if we need to make the branch
optimization smarter... anyway the code is working.

Ciao,
  Massi

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


More information about the Mono-devel-list mailing list