public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
To: "Jeff Law" <law@redhat.com>, "Martin Liška" <mliska@suse.cz>
Cc: Richard Guenther <richard.guenther@gmail.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 2/4] Remove unused functions and fields.
Date: Fri, 05 Oct 2018 02:19:00 -0000	[thread overview]
Message-ID: <CAC1BbcSrUW8hmAkWkteb_UrnExhy_onRpjC1ky9Sk5pfbnVJVg@mail.gmail.com> (raw)
In-Reply-To: <DB16068E-AC23-4712-96FA-765428A7A932@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1508 bytes --]

Hi!

So i just added archive handling to ease looking at more than just the
plain frontends, applied as r264856.

You can now use the exact files passed to the driver when linking e.g. cc1.
We link libcommon.a twice? Didn't look.

e.g.:
me@there:.../gcc$ /scratch/src/gcc-trunk/contrib/unused_functions.py
c/c-lang.o c-family/stub-objc.o attribs.o c/c-errors.o c/c-decl.o
c/c-typeck.o c/c-convert.o c/c-aux-info.o c/c-objc-common.o
c/c-parser.o c/c-fold.o c/gimple-parser.o c-family/c-common.o
c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o
c-family/c-gimplify.o c-family/c-indentation.o c-family/c-lex.o
c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o
c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o
c-family/c-semantics.o c-family/c-ada-spec.o c-family/c-ubsan.o
c-family/known-headers.o c-family/c-attribs.o c-family/c-warn.o
c-family/c-spellcheck.o i386-c.o glibc-c.o   cc1-checksum.o
libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a
../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a
../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a
../libdecnumber/libdecnumber.a

results in the attached output.

This properly flags functions like e.g.: init_branch_prob (dead code),
bitwise_mode_for_mode in stor-layout.c (should be static).

Of course it also complains about cases like supports_one_only() in cc1
where that is only used in cc1plus.
Likewise constant_pool_empty_p() on i386 which is only used by ppc and spe.

HTH,

[-- Attachment #2: cc1-unused_funcs.txt.xz --]
[-- Type: application/x-xz, Size: 12460 bytes --]

  reply	other threads:[~2018-10-04 22:43 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-24  7:37 [PATCH 0/4] Clean-up warnings spotted by Rtags marxin
2018-09-24  7:37 ` [PATCH 1/4] Add filter-rtags-warnings.py script marxin
2018-09-24 14:45   ` Jeff Law
2018-09-24  7:37 ` [PATCH 4/4] Fix scaling of a sreal number marxin
2018-09-24 14:42   ` Jeff Law
2018-09-24  7:37 ` [PATCH 3/4] Fix small coding style issues (PR fortran/87394) marxin
2018-09-24 14:39   ` Jeff Law
2018-09-24  7:39 ` [PATCH 2/4] Remove unused functions and fields marxin
2018-09-24 14:42   ` Jeff Law
2018-09-25  7:18     ` Martin Liška
2018-09-25 12:31       ` Richard Biener
2018-09-25 13:40         ` Jeff Law
2018-09-26  9:01           ` Martin Liška
2018-09-27 11:18             ` Bernhard Reutner-Fischer
2018-10-03 16:46               ` Jeff Law
2018-10-03 19:35                 ` Bernhard Reutner-Fischer
2018-10-05  2:19                   ` Bernhard Reutner-Fischer [this message]
2018-10-05 13:41                     ` Martin Liška
2018-10-09  8:52                       ` [PATCH] Remove dead functions and fix VMS target by moving back some functions Martin Liška
2018-10-09 22:53                         ` Martin Jambor
2018-10-10 11:13                           ` Martin Liška
2018-10-10 11:17                             ` Martin Jambor
2018-10-18 23:55   ` [PATCH 2/4] Remove unused functions and fields Ian Lance Taylor
2018-10-22 13:05     ` Martin Liška
2018-10-22 17:50       ` Ian Lance Taylor

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=CAC1BbcSrUW8hmAkWkteb_UrnExhy_onRpjC1ky9Sk5pfbnVJVg@mail.gmail.com \
    --to=rep.dot.nop@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.com \
    --cc=mliska@suse.cz \
    --cc=richard.guenther@gmail.com \
    /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).