This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Basic block profiler out of libgcc

On Mon, May 07, 2001 at 12:50:12PM +0200, Hans-Peter Nilsson wrote:
> > I'm open to suggestions - perhaps we can find a way to make
> > ASM_OUTPUT_IDENT work for GCC's .ident, then we wouldn't need
> > IDENT_ASM_OP at all.
> I think you misunderstood, the point is that I don't *want* the
> gcc .ident!  I want to be able to turn it off, without also
> turning off explicit #ident.

Okay, but isn't that a command line option you want, then?
-fno-gcc-ident would be dead easy.  I think -fno-ident should mean no
idents at all, neither from gcc nor from #ident.

[I've never seen what the use of #ident was, or 'static const char
rcsid[] = "..."' for that matter, but that's a side issue.  I DO see
the use of gcc-.ident, for archaeology if nothing else.]

The semantics of -fno-ident, incidentally, are cloned from the
semantics of -Qn on SVR4 targets; they are what they are intended to
be, and if the docs don't match, the docs should be fixed.  (gcc.c
accepts -Qn as a synonym of -fno-ident, btw.)

> This gcc-.ident should not sneak
> in through ASM_OUTPUT_IDENT and not through IDENT_ASM_OP.  It
> should come through an explicit macro like ASM_IDENTIFY_GCC,
> perhaps an ASM_IDENTIFY_GCC_VERSION (file, string) which could
> certainly by default use IDENT_ASM_OP when available, or perhaps
> even default to use ASM_OUTPUT_IDENT.

If you must have a per-target toggle for gcc-.ident, then I think it
should come in the form of a boolean.  NO_GCC_IDENT, say.  And
toplev.c should figure out how to use ASM_OUTPUT_IDENT, and
IDENT_ASM_OP should go away.  (Worst case, sprintf followed by
ASM_OUTPUT_IDENT, but we can probably do better than that.)

However, as a consistency-between-targets matter I think that we
either should never emit .ident for gcc, or we should emit one on all
targets where the object file has the concept.

I do not have a strong opinion about which option to choose.

zw        This is, no doubt, the rational strategy; quite possibly the
          only one that will work.  But it ignores the exigiencies of
          the tenure system and is therefore impractical.
          	-- Jerry Fodor, _The Mind Doesn't Work That Way_

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]