This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Google] Adjust comdat-sharing-probability param for -Os
- From: Easwaran Raman <eraman at google dot com>
- To: Xinliang David Li <davidxl at google dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 27 Sep 2013 16:52:39 -0700
- Subject: Re: [Google] Adjust comdat-sharing-probability param for -Os
- Authentication-results: sourceware.org; auth=none
- References: <CAPK5YPZ-84Sfa_tB7-UONDA_r6+UN25wkfp6WZ4suMF30wamrw at mail dot gmail dot com> <CAAkRFZKCGZKDAut6h3FX6VP83hfgWp8UpF8hp0ED3r7SHSHqeQ at mail dot gmail dot com>
On Fri, Sep 27, 2013 at 4:08 PM, Xinliang David Li <davidxl@google.com> wrote:
> d.growth -= (info->size
> * (100 - PARAM_VALUE (PARAM_COMDAT_SHARING_PROBABILITY))
> + 50) / 100;
>
> What is the purpose of '50' here?
Rounding after division by 100.
> The patch is fine for Google branch.
>
> Other tunings to think about -- I think the sharing probability should
> not be a fixed value -- but depending on the function's charateristics
> -- such as size, number of callsites etc. For instance, for small leaf
> comdat functions, the sharing probability will be small.
> David
>
>
> On Fri, Sep 27, 2013 at 2:57 PM, Easwaran Raman <eraman@google.com> wrote:
>> This patch increases comdat-sharing-probability to 80 under -Os. This
>> reduces the amount of inlining and helps internal benchmarks.
>> Unfortunately, this causes slight regression on spec 2006. Ok for
>> google branches if all tests pass?
>>
>> - Easwaran