[GOOGLE] Disable aggressive loop peeling to prevent code bloat.

Dehao Chen dehao@google.com
Thu Sep 26 03:09:00 GMT 2013


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");



More information about the Gcc-patches mailing list