Selective scheduling pass - middle end changes [1/1]

Andrey Belevantsev
Tue Jul 8 14:54:00 GMT 2008


Ian Lance Taylor wrote:
> Well, I'm uncomfortable with the idea of the hook.  I wouldn't
> necessarily mind a complete hook interface.  But the one you've
> implemented seems sort of ad hoc and easy to get wrong.  We don't
> currently have any way for a pass to clearly track every change to the
> RTL insn stream.  If we need that, I think we should do it for real.
I have looked closely at the places where jumps are generated by 
cfgrtl.c.  There are only two of them, one in 
force_fallthru_and_redirect and one in try_redirect_by_replacing_jump, 
and all our usage of split_edge and redirect_edge_and_branch leads to 
these places.  What if I add an interface for register/unregister a hook 
that would notify of creating new jumps by those functions?  This way, 
the changes in the scheduler will be minimal, and the hook itself would 
be much more safe.  I can make it a general cfg hook if desired, but I 
doubt that tree cfg or cfglayout will use it.


More information about the Gcc-patches mailing list