From 6b6a21696710ecae0556a8ede7f235ac8dca56a9 Mon Sep 17 00:00:00 2001 From: dje Date: Wed, 5 Oct 2005 19:11:42 +0000 Subject: * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105011 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/bb-reorder.c | 2 +- gcc/doc/invoke.texi | 5 +++++ gcc/params.def | 6 ++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 677e379a9d4..2d50993e3d2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-10-05 David Edelsohn + + * 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 PR target/23602 diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c index 68d2cd88205..8bf37afe189 100644 --- a/gcc/bb-reorder.c +++ b/gcc/bb-reorder.c @@ -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) { diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index b859a7f423f..7717e947c52 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -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 diff --git a/gcc/params.def b/gcc/params.def index 3ac45979a21..ea64a3865eb 100644 --- a/gcc/params.def +++ b/gcc/params.def @@ -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", -- cgit v1.2.1