[RFA] Fix Ada bootstrap (was: 16: EH redirection)

Jan Hubicka hubicka@ucw.cz
Thu Apr 30 11:10:00 GMT 2009


> > If CSE introduces unreachable basic blocks and cse_main does *not*
> > return non-zero, then cse_main is broken.
> 
> This issue is now triggered during bootstrap by some Ada RTS changes,
> thus Ada bootstrap is now broken on at least x86_64-linux.

I actually misanalyzed the problem last time assuming that if DSE claims
to have removed nothing it really removed nothing.  In fact it is DSE
pass just before fwprop making unreachable block.

The problem as seen on Ada testsuite is following:
1) DSE calls df_analyze with flags enabling embedeed DCE
2) df_analyze does embedded DCE
3) DCE deletes memory store that is believed to throw because of
-fnon-call-exceptions
4) DCE does clean CFG after removing instructions it believes that may
throw but it has wrong test that prevents it from calling
delete_unreachable_blocks after removing non-call throwing instructions.
It really wants can_throw_internal. As a result, the unreachable BB is left in
the CFG
5) df_analyze notices something changes and recomputes dataflow
6) DSE does nothing so it does not clean CFFG.
7) fwprop2 fails to build dominance info because CFG contains unreachable
BB.

Now the problem is that fixing 4) actually causes ICE in 5) because
df_analyze is still having bitmap all_blocks that are set by caller in
step 1.

I do not know how to fix this properly.  I can either make DCE to not
remove unreachable blocks and remove them somewhere later, or simply
drop DCE flag on DSE df_analyze or declare that it is up to caller to
cleanup CFG after calling df_analyze with DCE flag when df_analyze
somehow signalizes that it removed some throwing instructions or make
DCE to update the bitmap?

Honza
> 
> Richard.



More information about the Gcc-patches mailing list