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] Disable aggressive loop peeling to prevent code bloat.


I wish there is better heuristic in the future. For now it is ok.

David

On Wed, Sep 25, 2013 at 2:48 PM, Dehao Chen <dehao@google.com> wrote:
> This patch disables aggressive loop peeling when profile is available.
> This prevents extensive code bloat which leads to increased i-cache
> misses.
>
> Bootstrapped and passed regression tests.
>
> OK for google-4_8?
>
> Thanks,
> Dehao
>
> Index: gcc/loop-unroll.c
> ===================================================================
> --- gcc/loop-unroll.c (revision 202926)
> +++ gcc/loop-unroll.c (working copy)
> @@ -1574,8 +1574,7 @@ decide_peel_simple (struct loop *loop, int flags)
>       peeling it is not the case.  Also a function call inside loop is
>       also branch from branch prediction POV (and probably better reason
>       to not unroll/peel).  */
> -  if (desc->num_branches > 1
> -      && profile_status != PROFILE_READ)
> +  if (desc->num_branches > 1)
>      {
>        if (dump_file)
>   fprintf (dump_file, ";; Not peeling, contains branches\n");


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