From: David Malcolm <dmalcolm@redhat.com>
To: Michael Matz <matz@suse.de>, Martin Sebor <msebor@gmail.com>
Cc: Segher Boessenkool <segher@kernel.crashing.org>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] final: Improve output for -dp and -fverbose-asm
Date: Thu, 30 Nov 2017 17:55:00 -0000 [thread overview]
Message-ID: <1512063985.27881.50.camel@redhat.com> (raw)
In-Reply-To: <alpine.LSU.2.21.1711301755560.25295@wotan.suse.de>
On Thu, 2017-11-30 at 18:02 +0100, Michael Matz wrote:
> Hi,
>
> On Thu, 30 Nov 2017, Martin Sebor wrote:
>
> > > addic 4,9,-1 # 70 [c=4 l=4] *adddi3_imm_carry_m1
> > > subfe 4,4,9 # 71 [c=4
> > > l=4] *subfdi3_carry_in_internal
> > > b .L5 # 81 [c=4 l=4] jump
> >
> > Not everyone who reads the verbose assembly is familiar with
> > GCC internals. Users read it to help debug problems in their
> > code. They shouldn't have to also study GCC source code to
> > understand what the contents mean.
>
> Um, I think that's a bit overactive. How would you know what
> adddi3_imm_carry_m1 really means without knowing the particular GCC
> backend? Or what the above magic number after # means?
>
> Or, for that matter, what "length" means? Could be byte-length,
> sure.
> But OTOH, for a RISC target it's always four, so why print it? The
> GCC
> developers surely meant cycle-length with that, nothing else makes
> sense.
>
> My point is, to interpret the asm dumps there's no way around having
> some
> knowledge and getting used to it. In addition I doubt they're used
> heavily to debug programs. Rather they're used to study the
> interaction
> between compiler and program (and potentially to find miscompilations
> or
> strangenesses the compiler emits). As such even -fverbose-asm is a
> low-level compiler debugging tool, not something for an end-user
> that
> needs stability or documentation.
-fverbose-asm is on the border of compiler-debugging vs end-user usage.
FWIW an improvement to -fverbose-asm was explicitly mentioned in the
gcc 7 release notes:
https://gcc.gnu.org/gcc-7/changes.html
and I've seen at least some end-users comment favorably on that change;
this was:
https://gcc.gnu.org/ml/gcc-patches/2016-08/msg01051.html
which was originally a "-fasm-show-source" option.
Dave
next prev parent reply other threads:[~2017-11-30 17:46 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-29 23:37 Segher Boessenkool
2017-11-30 7:52 ` Martin Sebor
2017-11-30 11:54 ` Segher Boessenkool
2017-11-30 16:06 ` Michael Matz
2017-11-30 16:36 ` Martin Sebor
2017-11-30 16:50 ` Segher Boessenkool
2017-11-30 17:02 ` Martin Sebor
2017-11-30 17:14 ` Michael Matz
2017-11-30 17:55 ` David Malcolm [this message]
2017-12-04 15:49 ` Michael Matz
2017-11-30 17:55 ` Martin Sebor
2017-12-01 0:32 ` Jeff Law
2017-12-01 22:52 ` Segher Boessenkool
2017-12-04 12:39 ` Michael Matz
2017-11-30 17:15 ` Segher Boessenkool
2017-11-30 22:59 ` Martin Sebor
2017-12-01 0:26 ` Jeff Law
2017-12-01 0:49 ` Jeff Law
2017-12-01 23:45 ` Segher Boessenkool
2017-11-30 16:44 ` Kyrill Tkachov
2017-11-30 16:54 ` Michael Matz
2017-11-30 16:55 ` Kyrill Tkachov
2017-11-30 17:07 ` Michael Matz
2017-12-01 0:22 ` Jeff Law
2017-12-01 0:25 ` Jeff Law
2017-12-01 1:17 ` Jeff Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1512063985.27881.50.camel@redhat.com \
--to=dmalcolm@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=matz@suse.de \
--cc=msebor@gmail.com \
--cc=segher@kernel.crashing.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).