public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/marxin/heads/partial-linking)] Try LTO partial linking.
@ 2021-05-21  8:39 Martin Liska
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Liska @ 2021-05-21  8:39 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:b209c7aea76ceb8eadcf5843f30299fc8041a579

commit b209c7aea76ceb8eadcf5843f30299fc8041a579
Author: Martin Liska <mliska@suse.cz>
Date:   Thu May 20 14:29:35 2021 +0200

    Try LTO partial linking.

Diff:
---
 gcc/Makefile.in | 33 +++++++++++++++++++++++++++++----
 1 file changed, 29 insertions(+), 4 deletions(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 1164554e6d6..decfea7412b 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -220,7 +220,9 @@ libgcov-util.o-warn = -Wno-error
 libgcov-driver-tool.o-warn = -Wno-error
 libgcov-merge-tool.o-warn = -Wno-error
 gimple-match.o-warn = -Wno-unused
+gimple-match-lto.o-warn = -Wno-unused
 generic-match.o-warn = -Wno-unused
+generic-match-lto.o-warn = -Wno-unused
 dfp.o-warn = -Wno-strict-aliasing
 
 # All warnings have to be shut off in stage1 if the compiler used then
@@ -1282,12 +1284,10 @@ ANALYZER_OBJS = \
 # will build them sooner, because they are large and otherwise tend to be
 # the last objects to finish building.
 OBJS = \
-	gimple-match.o \
-	generic-match.o \
+	common-base.a \
 	insn-attrtab.o \
 	insn-automata.o \
 	insn-dfatab.o \
-	insn-emit.o \
 	insn-extract.o \
 	insn-latencytab.o \
 	insn-modes.o \
@@ -1295,7 +1295,6 @@ OBJS = \
 	insn-output.o \
 	insn-peep.o \
 	insn-preds.o \
-	insn-recog.o \
 	insn-enums.o \
 	ggc-page.o \
 	adjust-alignment.o \
@@ -2627,6 +2626,32 @@ s-match: build/genmatch$(build_exeext) $(srcdir)/match.pd cfn-operators.pd
 	    					generic-match.c
 	$(STAMP) s-match
 
+gimple-match.o: gimple-match.c $(generated_files)
+generic-match.o: generic-match.c $(generated_files)
+
+ifdef PARTIAL_LTO
+LTO_LINKER_FLAGS = -flto=auto --param=lto-partitions=16 -flinker-output=nolto-rel -r
+LTO_FLAGS = -flto
+
+gimple-match-lto.o: gimple-match.c
+	$(COMPILE) $< $(LTO_FLAGS)
+generic-match-lto.o: generic-match.c
+	$(COMPILE) $< $(LTO_FLAGS)
+insn-recog-lto.o: insn-recog.c
+	$(COMPILE) $< $(LTO_FLAGS)
+insn-emit-lto.o: insn-emit.c
+	$(COMPILE) $< $(LTO_FLAGS)
+
+common-base.a: gimple-match-lto.o generic-match-lto.o insn-recog-lto.o insn-emit-lto.o
+	-rm -rf $@
+	$(LINKER) $^ $(LTO_LINKER_FLAGS) -o common-base.o
+	$(AR) $(AR_FLAGS)T $@ common-base.o
+else
+common-base.a: gimple-match.o generic-match.o insn-recog.o insn-emit.o
+	-rm -rf $@
+	$(AR) $(AR_FLAGS)T $@ $^
+endif
+
 GTFILES = $(CPPLIB_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
   $(host_xm_file_list) \
   $(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) $(srcdir)/bitmap.h \


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gcc(refs/users/marxin/heads/partial-linking)] Try LTO partial linking.
@ 2021-05-20 12:44 Martin Liska
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Liska @ 2021-05-20 12:44 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:7b27ae3ba562e447a8a12b8851ce8e4a769033a7

commit 7b27ae3ba562e447a8a12b8851ce8e4a769033a7
Author: Martin Liska <mliska@suse.cz>
Date:   Thu May 20 14:29:35 2021 +0200

    Try LTO partial linking.

Diff:
---
 gcc/Makefile.in | 33 +++++++++++++++++++++++++++++----
 1 file changed, 29 insertions(+), 4 deletions(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 1164554e6d6..decfea7412b 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -220,7 +220,9 @@ libgcov-util.o-warn = -Wno-error
 libgcov-driver-tool.o-warn = -Wno-error
 libgcov-merge-tool.o-warn = -Wno-error
 gimple-match.o-warn = -Wno-unused
+gimple-match-lto.o-warn = -Wno-unused
 generic-match.o-warn = -Wno-unused
+generic-match-lto.o-warn = -Wno-unused
 dfp.o-warn = -Wno-strict-aliasing
 
 # All warnings have to be shut off in stage1 if the compiler used then
@@ -1282,12 +1284,10 @@ ANALYZER_OBJS = \
 # will build them sooner, because they are large and otherwise tend to be
 # the last objects to finish building.
 OBJS = \
-	gimple-match.o \
-	generic-match.o \
+	common-base.a \
 	insn-attrtab.o \
 	insn-automata.o \
 	insn-dfatab.o \
-	insn-emit.o \
 	insn-extract.o \
 	insn-latencytab.o \
 	insn-modes.o \
@@ -1295,7 +1295,6 @@ OBJS = \
 	insn-output.o \
 	insn-peep.o \
 	insn-preds.o \
-	insn-recog.o \
 	insn-enums.o \
 	ggc-page.o \
 	adjust-alignment.o \
@@ -2627,6 +2626,32 @@ s-match: build/genmatch$(build_exeext) $(srcdir)/match.pd cfn-operators.pd
 	    					generic-match.c
 	$(STAMP) s-match
 
+gimple-match.o: gimple-match.c $(generated_files)
+generic-match.o: generic-match.c $(generated_files)
+
+ifdef PARTIAL_LTO
+LTO_LINKER_FLAGS = -flto=auto --param=lto-partitions=16 -flinker-output=nolto-rel -r
+LTO_FLAGS = -flto
+
+gimple-match-lto.o: gimple-match.c
+	$(COMPILE) $< $(LTO_FLAGS)
+generic-match-lto.o: generic-match.c
+	$(COMPILE) $< $(LTO_FLAGS)
+insn-recog-lto.o: insn-recog.c
+	$(COMPILE) $< $(LTO_FLAGS)
+insn-emit-lto.o: insn-emit.c
+	$(COMPILE) $< $(LTO_FLAGS)
+
+common-base.a: gimple-match-lto.o generic-match-lto.o insn-recog-lto.o insn-emit-lto.o
+	-rm -rf $@
+	$(LINKER) $^ $(LTO_LINKER_FLAGS) -o common-base.o
+	$(AR) $(AR_FLAGS)T $@ common-base.o
+else
+common-base.a: gimple-match.o generic-match.o insn-recog.o insn-emit.o
+	-rm -rf $@
+	$(AR) $(AR_FLAGS)T $@ $^
+endif
+
 GTFILES = $(CPPLIB_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
   $(host_xm_file_list) \
   $(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) $(srcdir)/bitmap.h \


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [gcc(refs/users/marxin/heads/partial-linking)] Try LTO partial linking.
@ 2021-05-20 12:29 Martin Liska
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Liska @ 2021-05-20 12:29 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:85228e612610c0e4b0324f6bebc84ef7c0211c4a

commit 85228e612610c0e4b0324f6bebc84ef7c0211c4a
Author: Martin Liska <mliska@suse.cz>
Date:   Thu May 20 14:29:35 2021 +0200

    Try LTO partial linking.

Diff:
---
 gcc/Makefile.in | 30 ++++++++++++++++++++++++++----
 1 file changed, 26 insertions(+), 4 deletions(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 1164554e6d6..f76bcea66f5 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -220,7 +220,9 @@ libgcov-util.o-warn = -Wno-error
 libgcov-driver-tool.o-warn = -Wno-error
 libgcov-merge-tool.o-warn = -Wno-error
 gimple-match.o-warn = -Wno-unused
+gimple-match-lto.o-warn = -Wno-unused
 generic-match.o-warn = -Wno-unused
+generic-match-lto.o-warn = -Wno-unused
 dfp.o-warn = -Wno-strict-aliasing
 
 # All warnings have to be shut off in stage1 if the compiler used then
@@ -1282,12 +1284,10 @@ ANALYZER_OBJS = \
 # will build them sooner, because they are large and otherwise tend to be
 # the last objects to finish building.
 OBJS = \
-	gimple-match.o \
-	generic-match.o \
+	common-base.a \
 	insn-attrtab.o \
 	insn-automata.o \
 	insn-dfatab.o \
-	insn-emit.o \
 	insn-extract.o \
 	insn-latencytab.o \
 	insn-modes.o \
@@ -1295,7 +1295,6 @@ OBJS = \
 	insn-output.o \
 	insn-peep.o \
 	insn-preds.o \
-	insn-recog.o \
 	insn-enums.o \
 	ggc-page.o \
 	adjust-alignment.o \
@@ -2627,6 +2626,29 @@ s-match: build/genmatch$(build_exeext) $(srcdir)/match.pd cfn-operators.pd
 	    					generic-match.c
 	$(STAMP) s-match
 
+ifdef PARTIAL_LTO
+LTO_LINKER_FLAGS = -flto=auto --param=lto-partitions=16 -flinker-output=nolto-rel -r
+LTO_FLAGS = -flto
+
+gimple-match-lto.o: gimple-match.c $(TARGET_H)
+	$(COMPILE) $< $(LTO_FLAGS)
+generic-match-lto.o: generic-match.c $(TARGET_H)
+	$(COMPILE) $< $(LTO_FLAGS)
+insn-recog-lto.o: insn-recog.c
+	$(COMPILE) $< $(LTO_FLAGS)
+insn-emit-lto.o: insn-emit.c
+	$(COMPILE) $< $(LTO_FLAGS)
+
+common-base.a: gimple-match-lto.o generic-match-lto.o insn-recog-lto.o insn-emit-lto.o
+	-rm -rf $@
+	$(LINKER) $^ $(LTO_LINKER_FLAGS) -o common-base.o
+	$(AR) $(AR_FLAGS)T $@ common-base.o
+else
+common-base.a: gimple-match.o generic-match.o insn-recog.o insn-emit.o
+	-rm -rf $@
+	$(AR) $(AR_FLAGS)T $@ $^
+endif
+
 GTFILES = $(CPPLIB_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
   $(host_xm_file_list) \
   $(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) $(srcdir)/bitmap.h \


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-21  8:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21  8:39 [gcc(refs/users/marxin/heads/partial-linking)] Try LTO partial linking Martin Liska
  -- strict thread matches above, loose matches on Subject: below --
2021-05-20 12:44 Martin Liska
2021-05-20 12:29 Martin Liska

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).