From 1c4c47db1846bb0f088817dda89a7c500438d662 Mon Sep 17 00:00:00 2001 From: Jeffrey Oldham Date: Tue, 1 May 2001 18:51:06 +0000 Subject: [PATCH] invoke.texi (Optimize Options): Add documentation for `--param max-delay-slot-insn-search' and `--param... 2001-05-01 Jeffrey Oldham * invoke.texi (Optimize Options): Add documentation for `--param max-delay-slot-insn-search' and `--param max-delay-slot-live-search' and reorder --param section. * params.def: Modify initial comment. * params.h (param_info): Add `help' member. * toplev.c (lang_independent_params): Include `help' description. (display_help): Print --param parameters. From-SVN: r41734 --- gcc/ChangeLog | 10 ++++++++++ gcc/invoke.texi | 26 +++++++++++++++++++++----- gcc/params.def | 4 +++- gcc/params.h | 2 ++ gcc/toplev.c | 16 +++++++++++++--- 5 files changed, 49 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 124f4f8a7af..bf2ef2ce4c2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2001-05-01 Jeffrey Oldham + + * invoke.texi (Optimize Options): Add documentation for `--param + max-delay-slot-insn-search' and `--param + max-delay-slot-live-search' and reorder --param section. + * params.def: Modify initial comment. + * params.h (param_info): Add `help' member. + * toplev.c (lang_independent_params): Include `help' description. + (display_help): Print --param parameters. + 2001-05-01 Zack Weinberg * config.gcc: Don't default xmake_file to ${cpu_type}/x-${cpu_type}. diff --git a/gcc/invoke.texi b/gcc/invoke.texi index 2db022b856a..b006ef954d7 100644 --- a/gcc/invoke.texi +++ b/gcc/invoke.texi @@ -3436,18 +3436,34 @@ In each case, the @var{value} is a integer. The allowable choices for @var{name} are given in the following table: @table @gcctabopt -@item max-inline-insns -If an function contains more than this many instructions, it -will not be inlined. This option is precisely equivalent to -@samp{-finline-limit}. +@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 +instructions is searched, the time savings from filling the delay slot +will be minimal so stop searching. Increasing values mean more +aggressive optimization, making the compile time increase with probably +small improvement in executable run time. + +@item max-delay-slot-live-search +When trying to fill delay slots, the maximum number of instructions to +consider when searching for a block with valid live register +information. Increasing this arbitrarily chosen value means more +aggressive optimization, increasing the compile time. This parameter +should be removed when the delay slot code is rewritten to maintain the +control-flow graph. @item max-gcse-memory The approximate maximum amount of memory that will be allocated in order to perform the global common subexpression elimination optimization. If more memory than specified is required, the optimization will not be done. -@end table +@item max-inline-insns +If an function contains more than this many instructions, it +will not be inlined. This option is precisely equivalent to +@samp{-finline-limit}. + +@end table @end table @node Preprocessor Options diff --git a/gcc/params.def b/gcc/params.def index 749414f6e9c..24b3aa26bb1 100644 --- a/gcc/params.def +++ b/gcc/params.def @@ -31,7 +31,9 @@ Boston, MA 02111-1307, USA. - A help string explaining how the parameter is used. - - A default value for the parameter. */ + - A default value for the parameter. + + Be sure to add an entry to invoke.texi summarizing the parameter. */ /* The maximum number of instructions accepted for inlining a function. Increasing values mean more agressive inlining. diff --git a/gcc/params.h b/gcc/params.h index d97e7bbc396..7fa06ff16dd 100644 --- a/gcc/params.h +++ b/gcc/params.h @@ -48,6 +48,8 @@ typedef struct param_info const char *option; /* The associated value. */ int value; + /* A short description of the option. */ + const char *help; } param_info; /* An array containing the compiler parameters and their current diff --git a/gcc/toplev.c b/gcc/toplev.c index 20205ec97f5..14a9fd06031 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -970,10 +970,10 @@ const char *user_label_prefix; static const param_info lang_independent_params[] = { #define DEFPARAM(ENUM, OPTION, HELP, DEFAULT) \ - { OPTION, DEFAULT }, + { OPTION, DEFAULT, HELP }, #include "params.def" #undef DEFPARAM - { NULL, 0 } + { NULL, 0, NULL } }; /* A default for same. */ @@ -3843,7 +3843,17 @@ display_help () printf (_(" -O[number] Set optimisation level to [number]\n")); printf (_(" -Os Optimise for space rather than speed\n")); - printf (_(" --param = Set constant controlling optimization\n")); + for (i = sizeof (compiler_params); i--;) + { + const char *description = compiler_params[i].help; + const int length = 21-strlen(compiler_params[i].option); + + if (description != NULL && * description != 0) + printf (" --param %s=%.*s%s\n", + compiler_params[i].option, + length > 0 ? length : 1, " ", + description); + } printf (_(" -pedantic Issue warnings needed by strict compliance to ISO C\n")); printf (_(" -pedantic-errors Like -pedantic except that errors are produced\n")); printf (_(" -w Suppress warnings\n")); -- 2.30.2