This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Google] Refine hot caller heuristic
- From: Xinliang David Li <davidxl at google dot com>
- To: Easwaran Raman <eraman at google dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Teresa Johnson <tejohnson at google dot com>
- Date: Thu, 29 Aug 2013 17:40:58 -0700
- Subject: Re: [Google] Refine hot caller heuristic
- Authentication-results: sourceware.org; auth=none
- References: <CAPK5YPbS5mMWvHF_843=MpauLGyEhVJWb6UViV6HAXV8hTy1ig at mail dot gmail dot com> <CAAkRFZL7YmvF8AujtqcWjp8KBkSgZNAJSx374bM3hgSj6LMq-g at mail dot gmail dot com> <CAPK5YPZ_ZCmKv05kz7vqA1BBxd8-9nnkvHq9mx6LiTCZCYyvOA at mail dot gmail dot com>
Ok. Do consider generalize it with 1) more inline hints (how the
parameters are used in callee); and 2) more parameter type (such as
addr_k, non_null_k, range_k etc you have proposed before) in the
future.
thanks,
David
On Thu, Aug 29, 2013 at 11:24 AM, Easwaran Raman <eraman@google.com> wrote:
> On Tue, Aug 20, 2013 at 9:35 PM, Xinliang David Li <davidxl@google.com> wrote:
>> Do you need to guard the jump function access with check if
>> (ipa_node_params_vector.exists ())?
> I believe it is not necessary since, for example, ipa_analyze_node
> calls ipa_check_create_node_params that calls create. But I see it is
> used in ipa-inline-analysis.c everywhere. So I have added a check and
> conservatively return false.
>
>>
>> Ideally, useful_cold_callee should be folded into the inline hints
>> estimation. Question about the heuristic: why filtering out
>> PASS_THROUGH parameter cases completely? Passing 'this' parameter in
>> many cases can result in good PRE opportunities. Why not skip the
>> unknown type?
>
> The rationale is it is useful to inline bar into foo in the snippet below:
>
> void foo ()
> {
> A a;
> bar(&a);
> ...
> }
>
> Capturing this requires UNKNOWN and KNOWN_TYPE jump functions. I have
> changed the check accordingly. I have attached the new patch.
>
> - Easwaran
>
>> David
>>
>> On Tue, Aug 20, 2013 at 12:26 PM, Easwaran Raman <eraman@google.com> wrote:
>>> The current hot caller heuristic simply promotes edges whose caller is
>>> hot. This patch does the following:
>>> * Turn it off for applications with large footprint since the size
>>> increase hurts them
>>> * Be more selective by considering arguments to callee when the
>>> heuristic is enabled.
>>>
>>> This performs well on internal benchmarks. Ok for google/4_8 branch if
>>> all tests pass?
>>>
>>> - Easwaran