This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Tighten pre-requisites for parallel make
- From: Michael Matz <matz at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 20 Apr 2009 04:14:31 +0200 (CEST)
- Subject: [patch] Tighten pre-requisites for parallel make
Hi,
we use order-only pre-requisites of GNU make to make sure that the
generated files are generated very early. This makes sense for things
like headers, i.e. files needed by other files. It does not make sense
for .c sources, which are nothing else than simply compiled and hence part
of ALL_HOST_OBJS already. The order in OBJS-common already will ensure
that they are generated as early as possible.
The longest job is genattrtab and compiling the resulting insn-attrtab.c.
Enforcing a strict ordering of all objects to come after insn-attrtab.c is
generated means that they don't even start compiling while genattrtab is
still running. This results (for me) in about one minute happening
nothing else than genattrtab, where things like tree-ssa*.c could very
well be compiled already.
The fix is to take out $(simple_generated_c) from $(generated_files).
$(generated_files) is only used for the order-only prereqs, so nothing
else is changed.
The effect of the patch with a C-only, non-bootstrap "make -j8 all-gcc":
before 2m45 realtime (no variation in three runs)
after 2m34 realtime (+- 0.5 seconds in three runs)
I've verified that genattrtab still starts as early as possible, and that
cc1 processes fill up the other seven slots (which doesn't happen before
the patch).
Tested with a C-only bootstrap and not regtested on x86_64-linux.
Doesn't seem to make sense for a change like this.
Ciao,
Michael.
--
* Makefile.in (generated_files): Take out $(simple_generated_c).
Index: Makefile.in
===================================================================
--- Makefile.in (Revision 146360)
+++ Makefile.in (Arbeitskopie)
@@ -3198,7 +3199,7 @@ $(simple_generated_c:insn-%.c=s-%): s-%:
$(STAMP) s-$*
generated_files = config.h tm.h $(TM_P_H) $(TM_H) multilib.h \
- $(simple_generated_h) $(simple_generated_c) specs.h \
+ $(simple_generated_h) specs.h \
tree-check.h genrtl.h insn-modes.h tm-preds.h tm-constrs.h \
$(ALL_GTFILES_H) gtype-desc.c gtype-desc.h gcov-iov.h