From 4111f1c9b2a59ad85c9d26bb83153eff887960af Mon Sep 17 00:00:00 2001 From: Nikolai Bozhenov Date: Mon, 9 Nov 2015 23:26:15 +0000 Subject: [PATCH] Change behavior of -fsched-verbose option * haifa-sched.c (setup_sched_dump): Don't redirect output to stderr. * common.opt (-fsched-verbose): Set default value to 1. * invoke.texi (-fsched-verbose): Update the option's description. From-SVN: r230061 --- gcc/ChangeLog | 6 ++++++ gcc/common.opt | 2 +- gcc/doc/invoke.texi | 7 +------ gcc/haifa-sched.c | 20 +++++++------------- 4 files changed, 15 insertions(+), 20 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 622f8602baf..dc2b11df49f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-11-09 Nikolai Bozhenov + + * haifa-sched.c (setup_sched_dump): Don't redirect output to stderr. + * common.opt (-fsched-verbose): Set default value to 1. + * invoke.texi (-fsched-verbose): Update the option's description. + 2015-11-09 Eric Botcazou * config/visium/visium.h (PRINT_OPERAND): Delete. diff --git a/gcc/common.opt b/gcc/common.opt index 961a1b63c47..757ce858735 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -1972,7 +1972,7 @@ Common Report Var(flag_schedule_speculative_load_dangerous) Optimization Allow speculative motion of more loads. fsched-verbose= -Common RejectNegative Joined UInteger Var(sched_verbose_param) +Common RejectNegative Joined UInteger Var(sched_verbose_param) Init(1) -fsched-verbose= Set the verbosity level of the scheduler. fsched2-use-superblocks diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 2198db0c13e..e2620a57c8b 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -7447,12 +7447,7 @@ The @var{number} should be different for every file you compile. @item -fsched-verbose=@var{n} @opindex fsched-verbose On targets that use instruction scheduling, this option controls the -amount of debugging output the scheduler prints. This information is -written to standard error, unless @option{-fdump-rtl-sched1} or -@option{-fdump-rtl-sched2} is specified, in which case it is output -to the usual dump listing file, @file{.sched1} or @file{.sched2} -respectively. However for @var{n} greater than nine, the output is -always printed to standard error. +amount of debugging output the scheduler prints to the dump files. For @var{n} greater than zero, @option{-fsched-verbose} outputs the same information as @option{-fdump-rtl-sched1} and @option{-fdump-rtl-sched2}. diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index caadc11b6a4..835648b688a 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -203,17 +203,14 @@ static int modulo_last_stage; /* sched-verbose controls the amount of debugging output the scheduler prints. It is controlled by -fsched-verbose=N: - N>0 and no -DSR : the output is directed to stderr. - N>=10 will direct the printouts to stderr (regardless of -dSR). - N=1: same as -dSR. + N=0: no debugging output. + N=1: default value. N=2: bb's probabilities, detailed ready list info, unit/insn info. N=3: rtl at abort point, control-flow, regions info. N=5: dependences info. */ - int sched_verbose = 0; -/* Debugging file. All printouts are sent to dump, which is always set, - either to stderr, or to the dump listing file (-dRS). */ +/* Debugging file. All printouts are sent to dump. */ FILE *sched_dump = 0; /* This is a placeholder for the scheduler parameters common @@ -7219,17 +7216,14 @@ set_priorities (rtx_insn *head, rtx_insn *tail) return n_insn; } -/* Set dump and sched_verbose for the desired debugging output. If no - dump-file was specified, but -fsched-verbose=N (any N), print to stderr. - For -fsched-verbose=N, N>=10, print everything to stderr. */ +/* Set sched_dump and sched_verbose for the desired debugging output. */ void setup_sched_dump (void) { sched_verbose = sched_verbose_param; - if (sched_verbose_param == 0 && dump_file) - sched_verbose = 1; - sched_dump = ((sched_verbose_param >= 10 || !dump_file) - ? stderr : dump_file); + sched_dump = dump_file; + if (!dump_file) + sched_verbose = 0; } /* Allocate data for register pressure sensitive scheduling. */ -- 2.30.2