[PATCH, pretty-ipa] Nuke call graph edges when inlining in all cases

Jan Hubicka hubicka@ucw.cz
Sat Jan 3 13:41:00 GMT 2009


> Hi,
> 
> optimize_inline_calls()  always discards all  edges outgoing  from the
> function into  which it has previously inlined  other stuff.  However,
> this function is called from  ipa-inline.c only when there actually is
> some inlining  (or early inlining) to do.   Consequently, the outgoing
> edges  are either  stripped off  or  left hanging  there depending  on
> inlining decisions.
> 
> For  the sake  of  consistency,  the following  patch  moves the  edge
> cleansing  to  the  two  callers  of this  function  and  performs  it
> unconditionally.
> 
> Bootstrapped and tested on x86_64-suse-linux, OK for pretty-ipa?

It woudl probably make most sense to make this pass manager property
destroyed by local passes. Early inliner is not only reason why edges
are wrong, i.e. with -fno-early-inlining I think your patch will make
worng edges to appear to later local passes....
It is not very pretty to modify entires of every local pass we have to
destroy cgraph edges, but I wonder what alternatives we have?

Honza



More information about the Gcc-patches mailing list