From: Andrew MacLeod <amacleod@redhat.com>
To: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: [patch 0/3] Header file reduction.
Date: Fri, 02 Oct 2015 02:22:00 -0000 [thread overview]
Message-ID: <560DEA79.8050709@redhat.com> (raw)
OK, newly regenerated patches to remove header files from the latest
version of the tools.
The patches are generated by a pair of tools.
* gcc-order-includes goes through the headers and canonically reorders
some of our more common/troublesome headers and removes any duplicates.
This includes headers which are included by other headers. (ie,
obstack.h can be removed as a duplicate if bitmap.h is included already.)
* remove-includes is the tool which tries to remove each non-conditional
header file and does the real work.
I'll have a patch shortly to add these and some other useful tools to a
header-tools directory in contrib.
There are 3 patches which follow: backend.a files, fe files, and config
files.. Effecting 547 files total
These were generated from a trunk snapshot taken about 2 weeks ago. The
tools ran, and once I finished some minor tweaking, I reapplied them to
a 9/28 branch. Anything which didn't apply cleanly due to intervening
changes, was simply re-reduced. I then reapplied them to a snapshot
from this morning for these patches.
The tool also monitor what macros are defined and conditionally
consumed, and wont remove a header which still compiles if it may define
a macro which is used in conditional compilation (tm.h is frequently
affected by this). The tool spits out messages like these:
* Passed host and target builds, but must keep target.h because it
provides ASM_OUTPUT_DEF Possibly required by ipa-icf.c
* Passed host and target builds, but must keep insn-attr.h because it
provides DELAY_SLOTS Possibly required by toplev.c
note my host arch doesn't define DELAY_SLOTS in insn-attr-common.h
(included by insn-attr.h) , but some other target archs do, and this is
caught this during some of the target builds. (toplev.c has the
following lines:)
#ifndef DELAY_SLOTS
if (flag_delayed_branch)
warning (0, "this target machine does not have delayed branches");
#endif
So as far as I can tell I'm catching all those conditional compilation
cases. The only ones I might have missed would be macros which some
host build defines on the command line and which doesn't show up in a
config-list.mk target build.. I guess.
Everything bootstraps on x86_64-pc-linux-gnu and
powerpc64le-unknown-linux-gnu. All targets in config-list.mk still
build. Regressions tests also came up clean.
OK for trunk?
I will make minor tweaks as needed when applying to trunk for
check-in.. I know that the new requirement for cgraph.h in builtins.c
is no longer required in trunk.
(https://gcc.gnu.org/ml/gcc-patches/2015-10/msg00102.html) Going
forward, we'll know when we are adding new dependencies, as this thread
so timely shows :-).
Andrew
PS. Then keep an eye for anything funny. I'm not expecting much, but if
a file causes an issue, simple reverting the change for that one file
should be sufficient until we figure out why it is an issue,. No change
in any of these files is dependent on any other.. it simple include
reduction, and there should be no functional change in code.
next reply other threads:[~2015-10-02 2:22 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-02 2:22 Andrew MacLeod [this message]
2015-10-02 2:33 ` [patch 1/3] Header file reduction - backend files Andrew MacLeod
2015-10-07 22:02 ` Jeff Law
2015-10-07 23:09 ` Andrew MacLeod
2015-10-08 13:37 ` [patch] header file re-ordering Andrew MacLeod
2015-10-08 15:29 ` Jeff Law
2015-10-11 20:58 ` [BUILDROBOT] Bootstrap broken in Ada (was: [patch] header file re-ordering.) Jan-Benedict Glaw
2015-10-11 22:27 ` [BUILDROBOT] Bootstrap broken in Ada Jeff Law
2015-10-11 22:35 ` Jan Hubicka
2015-10-12 8:04 ` [patch] header file re-ordering Jeff Law
2015-10-14 14:05 ` Andrew MacLeod
2015-10-19 21:05 ` Jeff Law
2015-10-16 19:52 ` config header file reduction patch checked in Andrew MacLeod
2015-10-16 20:17 ` Andrew MacLeod
2015-10-18 9:34 ` Iain Sandoe
2015-10-19 15:55 ` Andrew MacLeod
2015-10-23 17:02 ` Bernd Schmidt
2015-10-23 17:22 ` Mike Stump
2015-10-23 17:26 ` Bernd Schmidt
2015-10-23 17:36 ` Andrew MacLeod
2015-10-23 17:49 ` Mike Stump
2015-10-23 17:39 ` Mike Stump
2015-10-22 21:07 ` [patch] header file re-ordering Jeff Law
2015-10-22 21:21 ` Andrew MacLeod
2015-10-22 22:25 ` Jeff Law
2015-10-23 19:14 ` Jeff Law
2015-10-23 19:28 ` Andrew MacLeod
2015-10-22 22:33 ` [patch 1/3] Header file reduction - backend files Jeff Law
2015-10-22 22:36 ` Andrew MacLeod
2015-10-23 6:22 ` Jeff Law
2015-10-23 12:26 ` Andrew MacLeod
2015-10-23 15:15 ` Jeff Law
2015-10-23 16:30 ` Andrew MacLeod
2015-10-02 2:33 ` [patch 2/3] Header file reduction - config files Andrew MacLeod
2015-10-02 2:33 ` [patch 3/3] Header file reduction - FE files Andrew MacLeod
2015-10-05 13:55 ` [patch 0/3] Header file reduction Bernd Schmidt
2015-10-05 14:10 ` Richard Biener
2015-10-05 20:10 ` Andrew MacLeod
2015-10-05 20:37 ` Bernd Schmidt
2015-10-05 21:11 ` Andrew MacLeod
2015-10-06 3:03 ` [patch 0/3] Header file reduction. - unified patches Andrew MacLeod
2015-10-06 21:55 ` [patch 0/3] Header file reduction Jeff Law
2015-10-06 21:44 ` Jeff Law
2015-10-07 8:16 ` Richard Biener
2015-10-08 15:48 ` Michael Matz
2015-10-05 21:18 ` [patch 4/3] Header file reduction - Tools for contrib Andrew MacLeod
2015-10-06 10:27 ` Bernd Schmidt
2015-10-06 12:02 ` Bernd Schmidt
2015-10-06 14:04 ` Andrew MacLeod
2015-10-06 14:57 ` Bernd Schmidt
2015-10-06 19:19 ` Andrew MacLeod
2015-10-06 20:37 ` Bernd Schmidt
2015-10-06 21:30 ` Jeff Law
2015-10-06 22:43 ` Andrew MacLeod
2015-10-06 21:27 ` Jeff Law
2015-10-06 16:32 ` Joseph Myers
2015-10-06 19:18 ` Andrew MacLeod
2015-10-07 16:35 ` Andrew MacLeod
2015-10-14 15:14 ` [patch 4/3] Header file reduction - Tools for contrib - second cut Andrew MacLeod
2015-11-03 6:06 ` Jeff Law
2015-11-03 13:24 ` Andrew MacLeod
2015-11-03 14:00 ` Jeff Law
2015-11-03 14:19 ` Andrew MacLeod
2015-11-10 21:16 ` Jeff Law
2015-10-08 16:31 ` [patch 4/3] Header file reduction - Tools for contrib David Malcolm
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=560DEA79.8050709@redhat.com \
--to=amacleod@redhat.com \
--cc=gcc-patches@gcc.gnu.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).