This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/42371] dead code not eliminated during folding with whole-program


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42371

--- Comment #15 from Jan Hubicka <hubicka at ucw dot cz> 2013-01-19 21:48:12 UTC ---
> Clearing of address-taken does not work:
> 
> two/1 (two) @0x7fafc0e29818
>   Type: function
>   Visibility: prevailing_def_ironly
>   Address is taken.
>   References:
>   Referring: main/3 (addr)
>   Availability: available
>   Function flags: analyzed body finalized
>   Called by:
>   Calls:
> 
> that is, we do not re-compute address-taken after IPA inline transform stage
> and thus do not reclaim indirectly inlined functions that we no longer need.

We can't recompute here because inlining transform happens during the final
compilation stage, so the functions are already beging output to the assembly.

IPA-prop needs to realize that indirect inlining is going to optimize out the
address operation and remove the reference.  I assume this is not too hard to
implement - we only need to record when the function parameter is used _only_
of the stuff represented by jump functions and indirect edges. I was trying
to convince Martin to implement this for a while :)

Virtual functions are ven harder than indirect calls since we need to figure
out
the vtable will become unreachable at the IPA stage.

Honza


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]