On 11/11/2016 07:30 AM, Martin Liška wrote:
Hello.

Motivation for the patch is to dump IPA clones that were created
by all inter-procedural optimizations. Usage of such input is to track
set of functions where a code from another function can eventually occur.
Usage of the dump file can be seen here: [1].

Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.

Ready to be installed?
Martin

[1] https://github.com/marxin/kgraft-analysis-tool


0001-Introduce-fdump-ipa-clones-dump-output.patch


From 700b9833771a5b646d3db44014af81c007dd48f4 Mon Sep 17 00:00:00 2001
From: marxin <mli...@suse.cz>
Date: Wed, 9 Nov 2016 14:23:30 +0100
Subject: [PATCH] Introduce -fdump-ipa-clones dump output

gcc/ChangeLog:

2016-11-11  Martin Liska  <mli...@suse.cz>

        * 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.
---
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index cc730d2..2d59291 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 *sufix = NULL);
s/sufix/suffix/
?

OK with that nit fixed.

Sorry for the delays getting to this.

jeff

Reply via email to