params.def (PARAM_MAX_GROW_COPY_BB_INSNS): New.
authorDavid Edelsohn <edelsohn@gnu.org>
Wed, 5 Oct 2005 19:11:42 +0000 (19:11 +0000)
committerDavid Edelsohn <dje@gcc.gnu.org>
Wed, 5 Oct 2005 19:11:42 +0000 (15:11 -0400)
        * params.def (PARAM_MAX_GROW_COPY_BB_INSNS): New.
        * bb-reorder.c (copy_bb_p): Use it.
        * doc/invoke.texi (param table): Add max-grow-copy-bb-insn.

From-SVN: r105011

gcc/ChangeLog
gcc/bb-reorder.c
gcc/doc/invoke.texi
gcc/params.def

index 677e379a9d487f913815b9f87558ab105c5f9055..2d50993e3d2d42c56102ee8873ea8bc17dd23752 100644 (file)
@@ -1,3 +1,9 @@
+2005-10-05  David Edelsohn  <edelsohn@gnu.org>
+
+       * params.def (PARAM_MAX_GROW_COPY_BB_INSNS): New.
+       * bb-reorder.c (copy_bb_p): Use it.
+       * doc/invoke.texi (param table): Add max-grow-copy-bb-insn.
+
 2005-10-05  Richard Henderson  <rth@redhat.com>
 
        PR target/23602
index 68d2cd88205df94188be428b0c7aeda493ecec9b..8bf37afe1897b414944533e658b0094443ae742a 100644 (file)
@@ -1173,7 +1173,7 @@ copy_bb_p (basic_block bb, int code_may_grow)
     return false;
 
   if (code_may_grow && maybe_hot_bb_p (bb))
-    max_size *= 8;
+    max_size *= PARAM_VALUE (PARAM_MAX_GROW_COPY_BB_INSNS);
 
   FOR_BB_INSNS (bb, insn)
     {
index b859a7f423ff1849128ac3cb400442cb948c1054..7717e947c52dcb13025c60880a58203d5471b05e 100644 (file)
@@ -5738,6 +5738,11 @@ of two blocks before crossjumping will be performed on them.  This
 value is ignored in the case where all instructions in the block being
 crossjumped from are matched.  The default value is 5.
 
+@item max-grow-copy-bb-insns
+The maximum code size expansion factor when copying basic blocks
+instead of jumping.  The expansion is relative to a jump instruction.
+The default value is 8.
+
 @item max-goto-duplication-insns
 The maximum number of instructions to duplicate to a block that jumps
 to a computed goto.  To avoid @math{O(N^2)} behavior in a number of
index 3ac45979a21e7366bcba8a66d7b992c7ebc75827..ea64a3865eba4064c7c239e08560cf3053c603d6 100644 (file)
@@ -349,6 +349,12 @@ DEFPARAM(PARAM_MIN_CROSSJUMP_INSNS,
      "The minimum number of matching instructions to consider for crossjumping",
      5, 0, 0)
 
+/* The maximum number expansion factor when copying basic blocks.  */
+DEFPARAM(PARAM_MAX_GROW_COPY_BB_INSNS,
+     "max-grow-copy-bb-insns",
+     "The maximum expansion factor when copying basic blocks",
+     8, 0, 0)
+
 /* The maximum number of insns to duplicate when unfactoring computed gotos.  */
 DEFPARAM(PARAM_MAX_GOTO_DUPLICATION_INSNS,
      "max-goto-duplication-insns",