aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto/lto-lang.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2018-06-08 18:12:39 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2018-06-08 16:12:39 +0000
commit29a50dfb47ff12c7730a3d604642ce500a39c78f (patch)
treebc0b8a743872bd4b0673daa75981a8ee8dbce830 /gcc/lto/lto-lang.c
parent850078b7387f7286aac70e1e594f39baf9f429af (diff)
downloadgcc-29a50dfb47ff12c7730a3d604642ce500a39c78f.zip
gcc-29a50dfb47ff12c7730a3d604642ce500a39c78f.tar.gz
gcc-29a50dfb47ff12c7730a3d604642ce500a39c78f.tar.bz2
dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
* dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4. * lto-lang.c (lto_link_dump_id, decl_merge_dump_id, partition_dump_id): New global vars. (lto_register_dumps): New hook. (LANG_HOOKS_REGISTER_DUMPS): New. * lto-partition.c: Dump into dump_file instead of symtab->dump_file. * lto-symtab.c: Include lto.h; dump into dump_file instead of symtab->dump_file. (lto_symtab_merge_decls): Initialize dump file. * lto.c (read_cgraph_and_symbols): Initialize dump file. (do_whole_program_analysis): Likewise. From-SVN: r261337
Diffstat (limited to 'gcc/lto/lto-lang.c')
-rw-r--r--gcc/lto/lto-lang.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c
index 1a70f4f..a1a41bc 100644
--- a/gcc/lto/lto-lang.c
+++ b/gcc/lto/lto-lang.c
@@ -37,6 +37,9 @@ along with GCC; see the file COPYING3. If not see
#include "stringpool.h"
#include "attribs.h"
+/* LTO specific dumps. */
+int lto_link_dump_id, decl_merge_dump_id, partition_dump_id;
+
static tree handle_noreturn_attribute (tree *, tree, tree, int, bool *);
static tree handle_leaf_attribute (tree *, tree, tree, int, bool *);
static tree handle_const_attribute (tree *, tree, tree, int, bool *);
@@ -1375,6 +1378,23 @@ lto_init (void)
return true;
}
+/* Register c++-specific dumps. */
+
+void
+lto_register_dumps (gcc::dump_manager *dumps)
+{
+ lto_link_dump_id = dumps->dump_register
+ (".lto-link", "ipa-lto-link", "ipa-lto-link",
+ DK_ipa, OPTGROUP_NONE, false);
+ decl_merge_dump_id = dumps->dump_register
+ (".lto-decl-merge", "ipa-lto-decl-merge", "ipa-lto-decl-merge",
+ DK_ipa, OPTGROUP_NONE, false);
+ partition_dump_id = dumps->dump_register
+ (".lto-partition", "ipa-lto-partition", "ipa-lto-partition",
+ DK_ipa, OPTGROUP_NONE, false);
+}
+
+
/* Initialize tree structures required by the LTO front end. */
static void lto_init_ts (void)
@@ -1390,6 +1410,8 @@ static void lto_init_ts (void)
#define LANG_HOOKS_COMPLAIN_WRONG_LANG_P lto_complain_wrong_lang_p
#undef LANG_HOOKS_INIT_OPTIONS_STRUCT
#define LANG_HOOKS_INIT_OPTIONS_STRUCT lto_init_options_struct
+#undef LANG_HOOKS_REGISTER_DUMPS
+#define LANG_HOOKS_REGISTER_DUMPS lto_register_dumps
#undef LANG_HOOKS_HANDLE_OPTION
#define LANG_HOOKS_HANDLE_OPTION lto_handle_option
#undef LANG_HOOKS_POST_OPTIONS