On Mon, Nov 23, 2020 at 2:02 PM Martin Liška <[email protected]> wrote:
>
> On 11/23/20 12:00 PM, Richard Biener wrote:
> > Can you split out the unifying of -[gf]record-gcc-switches processing
> > and the target hook adjustment from the change introducing
> > -frecord-gcc-switches-format?
>
> Sure.
>
> >
> > dwarf2out.c seems to retain its gen_producer_string () even though
> > you duplicate it elsewhere and it is now unused? Please retain
> > the gen_producer_string name since the function does actual
> > processing and not just fetch a precomputed string from somewhere.
>
> Yep, please take a look at the attached patch.
>
> >
> > I'd like somebody else chime in on the -frecord-gcc-switches-format
> > driver handling but will happily work with getting the unification part
> > merged.
>
> May I apply the patch after it finishes regression tests and bootstrap?
@@ -1523,8 +1378,9 @@ process_options (void)
if (version_flag)
{
print_version (stderr, "", true);
- if (! quiet_flag)
- print_switch_values (print_to_stderr);
+ if (!quiet_flag)
+ fputs (gen_producer_string (lang_hooks.name, save_decoded_options,
+ save_decoded_options_count), stderr);
}
so I wonder whether this regresses (no newlines anymore, no separate
printing of options passed/enabled). Previously with -Q -v you'll get sth
like
options passed: -v
-iprefix
/home/rguenther/obj-gcc2-g/gcc/../lib64/gcc/x86_64-pc-linux-gnu/11.0.0/
-isystem ./include -isystem ./include-fixed t.c -mtune=generic
-march=x86-64 -O2
options enabled: -faggressive-loop-optimizations -falign-functions
-falign-jumps -falign-labels -falign-loops -fallocation-dce
-fasynchronous-unwind-tables -fauto-inc-dec -fbranch-count-reg
-fcaller-saves -fcode-hoisting -fcombine-stack-adjustments -fcompare-elim
-fcprop-registers -fcrossjumping -fcse-follow-jumps -fdefer-pop
-fdelete-null-pointer-checks -fdevirtualize -fdevirtualize-speculatively
-fdwarf2-cfi-asm -fearly-inlining -feliminate-unused-debug-symbols
...
but after the change it will most definitely _not_ include all the -f options
implied by -O2? So how does a standard -O2 -fverbose-asm compare?
How does -Q -v compare? How does the producer string in dwarf
compare (I guess that's actually equal since we now use that reporting style).
Thanks,
Richard.
> Thanks,
> Martin
>
> >
> > Richard.
>