From bbcb0c056be0883aa970eb5552bb713d516d9c1e Mon Sep 17 00:00:00 2001 From: Steven Bosscher Date: Tue, 1 Feb 2005 10:03:15 +0000 Subject: re PR rtl-optimization/15242 (pessimization of "goto *") PR optimization/15242 * params.def (PARAM_MAX_GOTO_DUPLICATION_INSNS): New param. * basic-block.h (duplicate_computed_gotos): Add prototype. * bb-reorder.c (duplicate_computed_gotos): New function to duplicate sufficiently small blocks ending in a computed jump. * passes.c (rest_of_compilation): Call duplicate_computed_gotos if not optimizing for size. * cfgcleanup.c (try_crossjump_bb): If not optimizing for size, never do tail merging for blocks ending in a computed jump. * doc/invoke.texi: Document the max-goto-duplication-insns param. From-SVN: r94531 --- gcc/doc/invoke.texi | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gcc/doc/invoke.texi') diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index b58cd41..1247f64 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -5344,6 +5344,14 @@ 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-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 +passes, GCC factors computed gotos early in the compilation process, +and unfactors them as late as possible. Only computed jumps at the +end of a basic blocks with no more than max-goto-duplication-insns are +unfactored. The default value is 8. + @item max-delay-slot-insn-search The maximum number of instructions to consider when looking for an instruction to fill a delay slot. If more than this arbitrary number of -- cgit v1.1