diff options
author | Hrishikesh Kulkarni <hrishikeshparag@gmail.com> | 2019-05-06 07:23:25 +0000 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2019-05-06 07:23:25 +0000 |
commit | 66d62d9f2e6b059be6a018397fba555147133a9a (patch) | |
tree | fab164b40d0f06c1e3b883ed151202724aa28fd7 /gcc/lto/Make-lang.in | |
parent | a79420f995764129dc40d1abcbf8ce75a0b0f906 (diff) |
Add lto-dump tool.
2019-05-06 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
Martin Liska <mliska@suse.cz>
* Makefile.in: Add lto-dump.texi.
* cgraph.h: Add new functions get_visibility_string and
get_symtab_type_string.
* doc/gcc.texi: Include lto-dump section.
* doc/lto-dump.texi: New file.
* dumpfile.c (dump_switch_p_1): Use parse_dump_option.
(parse_dump_option): Factor out this function.
* dumpfile.h (enum dump_flag): Add new value TDF_ERROR.
(parse_dump_option): Export the function.
* symtab.c (symtab_node::get_visibility_string): New function.
(symtab_node::get_symtab_type_string): Likewise.
2019-05-06 Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
Martin Liska <mliska@suse.cz>
* Make-lang.in: Add lto_dump-related definition.
* config-lang.in: Likewise.
* lang.opt: Add new language LTODump and options related
to LTO dump tool.
* lto-common.c (lto_read_decls): Support type statistics dump.
(lto_file_read): Likewise for object files.
* lto-dump.c: New file.
* lto-lang.c (lto_option_lang_mask): Move from ..
* lto.c (lto_option_lang_mask): .. here.
* lto.h (lto_option_lang_mask): New declaration.
Co-Authored-By: Martin Liska <mliska@suse.cz>
From-SVN: r270897
Diffstat (limited to 'gcc/lto/Make-lang.in')
-rw-r--r-- | gcc/lto/Make-lang.in | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/gcc/lto/Make-lang.in b/gcc/lto/Make-lang.in index b7ed96eac29..92487e1f53e 100644 --- a/gcc/lto/Make-lang.in +++ b/gcc/lto/Make-lang.in @@ -21,9 +21,12 @@ # The name of the LTO compiler. LTO_EXE = lto1$(exeext) +LTO_DUMP_EXE = lto-dump$(exeext) # The LTO-specific object files inclued in $(LTO_EXE). LTO_OBJS = lto/lto-lang.o lto/lto.o lto/lto-object.o attribs.o lto/lto-partition.o lto/lto-symtab.o lto/lto-common.o lto_OBJS = $(LTO_OBJS) +LTO_DUMP_OBJS = lto/lto-lang.o lto/lto-object.o attribs.o lto/lto-partition.o lto/lto-symtab.o lto/lto-dump.o lto/lto-common.o +lto_dump_OBJS = $(LTO_DUMP_OBJS) # this is only useful in a LTO bootstrap, but this does not work right # now. Should reenable after this is fixed, but only when LTO bootstrap @@ -39,11 +42,14 @@ lto_OBJS = $(LTO_OBJS) # These hooks are used by the main GCC Makefile. Consult that # Makefile for documentation. -lto.all.cross: $(LTO_EXE) -lto.start.encap: $(LTO_EXE) +lto.all.cross: $(LTO_EXE) $(LTO_DUMP_EXE) +lto.start.encap: $(LTO_EXE) $(LTO_DUMP_EXE) lto.rest.encap: lto.tags: -lto.install-common: +lto.install-common: installdirs + $(INSTALL_PROGRAM) $(LTO_DUMP_EXE) \ + $(DESTDIR)/$(bindir)/$(LTO_DUMP_EXE) + lto.install-man: lto.install-info: lto.dvi: @@ -60,7 +66,7 @@ lto.srcinfo: lto.install-plugin: lto.mostlyclean: - rm -f $(LTO_OBJS) $(LTO_EXE) lto1.fda + rm -f $(LTO_OBJS) $(LTO_EXE) lto1.fda $(LTO_DUMP_OBJS) $(LTO_DUMP_EXE) lto-dump.fda lto.clean: lto.distclean: @@ -81,6 +87,12 @@ $(LTO_EXE): $(LTO_OBJS) $(BACKEND) $(LIBDEPS) +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ $(LTO_OBJS) $(BACKEND) $(BACKENDLIBS) $(LIBS) +$(LTO_DUMP_EXE): $(LTO_EXE) $(LTO_DUMP_OBJS) $(BACKEND) $(LIBDEPS) + +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ + $(LTO_DUMP_OBJS) $(BACKEND) $(BACKENDLIBS) $(LIBS) + +lto/lto-dump.o: $(LTO_EXE) + lto1.fda: ../prev-gcc/lto1$(exeext) ../prev-gcc/$(PERF_DATA) $(CREATE_GCOV) -binary ../prev-gcc/lto1$(exeext) -gcov lto1.fda -profile ../prev-gcc/$(PERF_DATA) -gcov_version 1 |