This is the mail archive of the gcc-patches@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]

Re: [google] Increase inlining limits with FDO/LIPO


Verified identical binaries created and submitted.

Mark

On Wed, May 18, 2011 at 11:37 AM, Xinliang David Li <davidxl@google.com> wrote:
> Ok with that change to google/main with some retesting.
>
> David
>
> On Wed, May 18, 2011 at 11:34 AM, Mark Heffernan <meheff@google.com> wrote:
>> On Wed, May 18, 2011 at 10:52 AM, Xinliang David Li <davidxl@google.com> wrote:
>>> The new change won't help those. Your original place will be ok if you
>>> test profile_arcs and branch_probability flags.
>>
>> Ah, yes. ÂI see your point now. Reverted to the original change with
>> condition profile_arc_flag and flag_branch_probabilities.
>>
>> Mark
>>
>>>
>>> David
>>>
>>>
>>> On Wed, May 18, 2011 at 10:39 AM, Mark Heffernan <meheff@google.com> wrote:
>>>> On Tue, May 17, 2011 at 11:34 PM, Xinliang David Li <davidxl@google.com>
>>>> wrote:
>>>>>
>>>>> To make consistent inline decisions between profile-gen and
>>>>> profile-use, probably better to check these two:
>>>>>
>>>>> flag_profile_arcs and flag_branch_probabilities. Â-fprofile-use
>>>>> enables profile-arcs, and value profiling is enabled only when
>>>>> edge/branch profiling is enabled (so no need to be checked).
>>>>
>>>> I changed the location where these parameters are set to someplace more
>>>> appropriate (to where the flags are set when profile gen/use is indicated).
>>>> ÂVerified identical binaries are generated.
>>>> OK as updated?
>>>>
>>>> Mark
>>>> 2011-05-18 ÂMark Heffernan Â<meheff@google.com>
>>>> * opts.c (set_profile_parameters): New function.
>>>> Index: opts.c
>>>> ===================================================================
>>>> --- opts.c   Â(revision 173666)
>>>> +++ opts.c   Â(working copy)
>>>> @@ -1209,6 +1209,25 @@ print_specific_help (unsigned int includ
>>>> Â Â Â Â Â Â Â Â Â Â Â Âopts->x_help_columns, opts, lang_mask);
>>>> Â}
>>>>
>>>> +
>>>> +/* Set parameters to more appropriate values when profile information
>>>> + Â is available. Â*/
>>>> +static void
>>>> +set_profile_parameters (struct gcc_options *opts,
>>>> + Â Â Â Â Â Â Â Â Â Â Â struct gcc_options *opts_set)
>>>> +{
>>>> + Â/* With accurate profile information, inlining is much more
>>>> + Â Â selective and makes better decisions, so increase the
>>>> + Â Â inlining function size limits. Â*/
>>>> + Âmaybe_set_param_value
>>>> + Â Â(PARAM_MAX_INLINE_INSNS_SINGLE, 1000,
>>>> + Â Â opts->x_param_values, opts_set->x_param_values);
>>>> + Âmaybe_set_param_value
>>>> + Â Â(PARAM_MAX_INLINE_INSNS_AUTO, 1000,
>>>> + Â Â opts->x_param_values, opts_set->x_param_values);
>>>> +}
>>>> +
>>>> +
>>>> Â/* Handle target- and language-independent options. ÂReturn zero to
>>>> Â Â generate an "unknown option" message. ÂOnly options that need
>>>> Â Â extra handling need to be listed here; if you simply want
>>>> @@ -1560,6 +1579,7 @@ common_handle_option (struct gcc_options
>>>> Â Â Â Â opts->x_flag_unswitch_loops = value;
>>>> Â Â Â Âif (!opts_set->x_flag_gcse_after_reload)
>>>> Â Â Â Â opts->x_flag_gcse_after_reload = value;
>>>> + Â Â Âset_profile_parameters (opts, opts_set);
>>>> Â Â Â Âbreak;
>>>>
>>>> Â Â Âcase OPT_fprofile_generate_:
>>>> @@ -1580,6 +1600,7 @@ common_handle_option (struct gcc_options
>>>> Â Â Â Â Âis done. Â*/
>>>> Â Â Â Âif (!opts_set->x_flag_ipa_reference && in_lto_p)
>>>> Â Â Â Â Âopts->x_flag_ipa_reference = false;
>>>> + Â Â Âset_profile_parameters (opts, opts_set);
>>>> Â Â Â Âbreak;
>>>>
>>>> Â Â Âcase OPT_fshow_column:
>>>>
>>>
>>
>


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