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.h | |
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.h')
-rw-r--r-- | gcc/cgraph.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h index cc730d2..3feed7a 100644 --- a/gcc/cgraph.h +++ b/gcc/cgraph.h @@ -906,13 +906,14 @@ public: If the new node is being inlined into another one, NEW_INLINED_TO should be the outline function the new one is (even indirectly) inlined to. All hooks will see this in node's global.inlined_to, when invoked. - Can be NULL if the node is not inlined. */ + Can be NULL if the node is not inlined. SUFFIX is string that is appended + to the original name. */ cgraph_node *create_clone (tree decl, gcov_type count, int freq, bool update_original, vec<cgraph_edge *> redirect_callers, bool call_duplication_hook, cgraph_node *new_inlined_to, - bitmap args_to_skip); + bitmap args_to_skip, const char *suffix = NULL); /* Create callgraph node clone with new declaration. The actual body will be copied later at compilation stage. */ @@ -933,11 +934,14 @@ public: If non-NULL BLOCK_TO_COPY determine what basic blocks was copied to prevent duplications of calls that are dead - in the clone. */ + in the clone. + + SUFFIX is string that is appended to the original name. */ cgraph_node *create_version_clone (tree new_decl, vec<cgraph_edge *> redirect_callers, - bitmap bbs_to_copy); + bitmap bbs_to_copy, + const char *suffix = NULL); /* Perform function versioning. Function versioning includes copying of the tree and @@ -2223,6 +2227,10 @@ public: /* Return symbol used to separate symbol name from suffix. */ static char symbol_suffix_separator (); + FILE* GTY ((skip)) ipa_clones_dump_file; + + hash_set <const cgraph_node *> GTY ((skip)) cloned_nodes; + private: /* Allocate new callgraph node. */ inline cgraph_node * allocate_cgraph_symbol (void); @@ -2313,6 +2321,10 @@ tree clone_function_name (tree decl, const char *); void tree_function_versioning (tree, tree, vec<ipa_replace_map *, va_gc> *, bool, bitmap, bool, bitmap, basic_block); +void dump_callgraph_transformation (const cgraph_node *original, + const cgraph_node *clone, + const char *suffix); + /* In cgraphbuild.c */ int compute_call_stmt_bb_frequency (tree, basic_block bb); void record_references_in_initializer (tree, bool); |