Split part of functionality from lto.c to lto-common.c.

2019-05-06  Martin Liska  <mliska@suse.cz>
	    Hrishikesh Kulkarni  <hrishikeshparag@gmail.com>

	* Make-lang.in: Add lto-common.o.
	* config-lang.in: Likewise for gtfiles.
	* lto-common.c: New file.
	* lto-common.h: New file.
	* lto-lang.c: Include lto-common.h.
	* lto.c: Move most of the functionality
	into lto-common.c file.

Co-Authored-By: Hrishikesh Kulkarni <hrishikeshparag@gmail.com>

From-SVN: r270896
This commit is contained in:
Martin Liska 2019-05-06 09:23:03 +02:00 committed by Martin Liska
parent 2bf6d93547
commit a79420f995
7 changed files with 2909 additions and 2812 deletions

View File

@ -1,3 +1,14 @@
2019-05-06 Martin Liska <mliska@suse.cz>
Hrishikesh Kulkarni <hrishikeshparag@gmail.com>
* Make-lang.in: Add lto-common.o.
* config-lang.in: Likewise for gtfiles.
* lto-common.c: New file.
* lto-common.h: New file.
* lto-lang.c: Include lto-common.h.
* lto.c: Move most of the functionality
into lto-common.c file.
2019-04-12 Jan Hubicka <hubicka@ucw.cz>
* lto.c (do_stream_out): rename to ...

View File

@ -22,7 +22,7 @@
# The name of the LTO compiler.
LTO_EXE = lto1$(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_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)
# this is only useful in a LTO bootstrap, but this does not work right

View File

@ -20,7 +20,7 @@
language="lto"
compilers="lto1\$(exeext)"
gtfiles="\$(srcdir)/lto/lto-tree.h \$(srcdir)/lto/lto-lang.c \$(srcdir)/lto/lto.c \$(srcdir)/lto/lto.h"
gtfiles="\$(srcdir)/lto/lto-tree.h \$(srcdir)/lto/lto-lang.c \$(srcdir)/lto/lto.c \$(srcdir)/lto/lto.h \$(srcdir)/lto/lto-common.h \$(srcdir)/lto/lto-common.c"
# LTO is a special front end. From a user's perspective it is not
# really a language, but a middle end feature. However, the GIMPLE

2837
gcc/lto/lto-common.c Normal file

File diff suppressed because it is too large Load Diff

33
gcc/lto/lto-common.h Normal file
View File

@ -0,0 +1,33 @@
/* LTO common functions between lto.c and lto-dump.c header file.
Copyright (C) 2018 Free Software Foundation, Inc.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
#ifndef LTO_COMMON_H
#define LTO_COMMON_H
void lto_fe_init (void);
void read_cgraph_and_symbols (unsigned, const char **);
void print_lto_report_1 (void);
extern tree lto_eh_personality_decl;
extern GTY(()) vec<tree, va_gc> *tree_with_vars;
extern const unsigned char *lto_mode_identity_table;
extern tree first_personality_decl;
#endif

View File

@ -34,6 +34,7 @@ along with GCC; see the file COPYING3. If not see
#include "debug.h"
#include "lto-tree.h"
#include "lto.h"
#include "lto-common.h"
#include "stringpool.h"
#include "attribs.h"

File diff suppressed because it is too large Load Diff