|
Hello,
If a goto BB is
duplicated,there maybe a mistake in the
Fixup_Arcs function:
if (BB_Fall_Thru_Successor(pred)
== old_bb) {
Link_Pred_Succ_with_Prob(dup, new_bb,
BBLIST_prob(blsucc)); } else if (BB_kind(dup) ==
BBKIND_LOGIF) {
Target_Cond_Branch(dup, new_bb,
BBLIST_prob(blsucc)); } else {
...
... } }
}
In the above code,I think the following statements
should be
added after Link_Pred_Succ_With_Prob(... ...)
:
if (BB_kind(dup) == BBKIND_GOTO)
{
BB_Remove_Branch(dup); }
Though goto BB's fallthrough is its succ make the
goto BB
no use,but sometimes it really
happened.Is this correct?
Thanks!
With my best regards,
Liu Yang
Advanced Compiler Lab Institute of Computing
Technology Chinese Academy of Science E-Mail : ly@xxxxxxxxx
|