[PATCH] Account for devirtualization opportunities in inliner
Richard Guenther
richard.guenther@gmail.com
Thu Oct 20 08:30:00 GMT 2011
On Wed, Oct 19, 2011 at 11:59 PM, Maxim Kuvyrkov <maxim@codesourcery.com> wrote:
> On 28/09/2011, at 4:56 PM, Maxim Kuvyrkov wrote:
>
>> Jan,
>>
>> The following patch starts a series of patches which improve devirtualization optimizations in GCC.
>>
>> This patch builds on ipa-cp.c and ipa-prop.c infrastructure for analyzing parameters and jump functions and adds basic estimation of devirtualization benefit from inlining an edge. E.g., if inlining A across edge E into B will allow some of the indirect edges of A to be resolved, then inlining cost of edge E is reduced.
>>
>> The patch was bootstrapped and regtested on x86_64-linux-gnu on both -m32 and -m64 multilibs.
>>
>> OK to commit?
>
> Ping.
>
> The primary change of this patch is to make evaluate_conditions_for_edge to output KNOWN_VALS and KNOWN_BINFOS arrays in addition to conditions for a callsite. KNOWN_VALS and KNOWN_BINFOS are then passed on to a subroutine of estimate_calls_size_and_time, which uses ipa-prop.c infrastructure to check if it will be possible to devirtualize any of the indirect edged within callee. If possible, then *size and *time returned by estimate_calls_size_and_time are reduced to account for the devirtualization benefits.
>
> OK for trunk?
I miss testcase(s). Any assesment on how this improves devirtualization
in practice (for example for Mozilla)?
Thanks,
Richard.
> --
> Maxim Kuvyrkov
> CodeSourcery / Mentor Graphics
>
>
More information about the Gcc-patches
mailing list