This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Google] Skip LIPO type unification for trivial module groups
- From: Xinliang David Li <davidxl at google dot com>
- To: Teresa Johnson <tejohnson at google dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 10 Oct 2013 12:03:08 -0700
- Subject: Re: [Google] Skip LIPO type unification for trivial module groups
- Authentication-results: sourceware.org; auth=none
- References: <CAAe5K+WayHxMw1bXwc1zcm5ajuhRg+_XycdH+6vmighKko_gAw at mail dot gmail dot com> <CAAkRFZLb5wyhqiHufBvLEj6jLvJGL=QLBZYw7EvM2q7UFuJgzw at mail dot gmail dot com> <CAAe5K+WpKKn7XfUo2gjfoFpWYkiu=06_XpBTRHtt7hAR0j-51Q at mail dot gmail dot com>
The option/parameter in theory should not have any effect to
profile-use build, but it is usually passed to both profile-gen and
profile-use compilation.
The reason to turn it on is to surface the type of error you have
fixed recently (it is triggered only with trivial module group).
David
On Thu, Oct 10, 2013 at 11:51 AM, Teresa Johnson <tejohnson@google.com> wrote:
> On Thu, Oct 10, 2013 at 11:42 AM, Xinliang David Li <davidxl@google.com> wrote:
>> It is better to turn it on when random stress test is also on: param
>> value of PARAM_LIPO_RANDOM_GROUP_SIZE is not the default value (0).
>
> I don't understand why - the random group size is used at dyn-ipa time
> to compute module groups, whereas this code happens during the
> profile-use compile. If the random group was still trivial, why would
> we want to do the type merging?
>
> Teresa
>
>>
>> if (!L_IPO_COMP_MODE || (num_in_fnames == 1 && PARAM_VALUE
>> (PARAM_LIPO_RANDOM_GROUP_SIZE) == 0))
>>
>> ok with this change.
>>
>> David
>>
>> On Thu, Oct 10, 2013 at 11:27 AM, Teresa Johnson <tejohnson@google.com> wrote:
>>> The following patch fixes an inefficiency whereby type unification
>>> was being attempted unnecessarily in LIPO even when there were no
>>> aux modules.
>>>
>>> Tested with regression tests and internal LIPO benchmark.
>>>
>>> Ok for google/4_8?
>>>
>>> Thanks,
>>> Teresa
>>>
>>> 2013-10-10 Teresa Johnson <tejohnson@google.com>
>>>
>>> * l-ipo.c (cgraph_unify_type_alias_sets): Skip LIPO type
>>> unification when there are no aux modules.
>>>
>>> Index: l-ipo.c
>>> ===================================================================
>>> --- l-ipo.c (revision 203260)
>>> +++ l-ipo.c (working copy)
>>> @@ -1059,7 +1059,7 @@ cgraph_unify_type_alias_sets (void)
>>> struct cgraph_node *node;
>>> struct varpool_node *pv;
>>>
>>> - if (!L_IPO_COMP_MODE)
>>> + if (!L_IPO_COMP_MODE || num_in_fnames == 1)
>>> return;
>>>
>>> vec_alloc (pending_types, 100);
>>>
>>> --
>>> Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413
>
>
>
> --
> Teresa Johnson | Software Engineer | tejohnson@google.com | 408-460-2413