On 10/22/2015 06:56 PM, Bernd Schmidt wrote:
On 10/22/2015 05:38 PM, Nikolai Bozhenov wrote:
Currently -fsched-verbose option redirects debugging dumps to stderr
if there is no dump_file for the current pass. It would be fine if
there were the only scheduling pass. But for example for AArch64
there are 3 scheduling passes in the default pipeline: sched1,
fusion and sched2. So, when passing options like
-fsched-verbose=7 -fdump-rtl-sched1 to GCC I get a neat dump for
sched1 in the file and a mess of fusion/sched2 logs in the console.
* 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.
That looks sensible, I agree that dumping to stderr does not make much
sense. When in the debugger you can still set sched_dump to stderr if
you want.
+ if (!dump_file)
+ sched_verbose = 0;
Do you even need that? Otherwise, patch OK.
Bernd
Most loggers look like
if (sched_verbose >= 4)
fprintf (sched_dump, ";;\tAdvance the current state.\n");
So, we need to make sure that sched_verbose is set to zero if
there's no dump_file. Otherwise, we'll be writing to NULL file
pointer.
Thanks,
Nikolai