diff options
author | Martin Liska <mliska@suse.cz> | 2016-11-30 10:28:19 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2016-11-30 09:28:19 +0000 |
commit | 0bdad1238b5b49ef3302321000d8eebf103e9038 (patch) | |
tree | 6d721cbe91abe7323a92144b80da27b5858de8ad /gcc/cgraph.c | |
parent | fb61d96cf20d5bb6db8fd72ef7b528804e9f6be4 (diff) | |
download | gcc-0bdad1238b5b49ef3302321000d8eebf103e9038.zip gcc-0bdad1238b5b49ef3302321000d8eebf103e9038.tar.gz gcc-0bdad1238b5b49ef3302321000d8eebf103e9038.tar.bz2 |
Introduce -fdump-ipa-clones dump output
* cgraph.c (symbol_table::initialize): Initialize
ipa_clones_dump_file.
(cgraph_node::remove): Report to ipa_clones_dump_file.
* cgraph.h: Add new argument (suffix) to cloning methods.
* cgraphclones.c (dump_callgraph_transformation): New function.
(cgraph_node::create_clone): New argument.
(cgraph_node::create_virtual_clone): Likewise.
(cgraph_node::create_version_clone): Likewise.
* dumpfile.c: Add .ipa-clones dump file.
* dumpfile.h (enum tree_dump_index): Add TDI_clones
* ipa-inline-transform.c (clone_inlined_nodes): Report operation
to dump_callgraph_transformation.
From-SVN: r243004
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index b702a7c..867e371 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -263,6 +263,9 @@ symbol_table::initialize (void) { if (!dump_file) dump_file = dump_begin (TDI_cgraph, NULL); + + if (!ipa_clones_dump_file) + ipa_clones_dump_file = dump_begin (TDI_clones, NULL); } /* Allocate new callgraph node and insert it into basic data structures. */ @@ -1815,6 +1818,12 @@ cgraph_node::remove (void) cgraph_node *n; int uid = this->uid; + if (symtab->ipa_clones_dump_file && symtab->cloned_nodes.contains (this)) + fprintf (symtab->ipa_clones_dump_file, + "Callgraph removal;%s;%d;%s;%d;%d\n", asm_name (), order, + DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl), + DECL_SOURCE_COLUMN (decl)); + symtab->call_cgraph_removal_hooks (this); remove_callers (); remove_callees (); |