aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraph.h
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2014-12-05 12:06:26 +0100
committerMartin Jambor <jamborm@gcc.gnu.org>2014-12-05 12:06:26 +0100
commit6a4bad955f8ab028190bbb4d3cf3c00721c26bfc (patch)
tree5535b89bdfdb34a70839578dacb6e9d89a13a6df /gcc/cgraph.h
parent612b47110ab93289e9d7fb4751e9f46fbd7d3485 (diff)
downloadgcc-6a4bad955f8ab028190bbb4d3cf3c00721c26bfc.zip
gcc-6a4bad955f8ab028190bbb4d3cf3c00721c26bfc.tar.gz
gcc-6a4bad955f8ab028190bbb4d3cf3c00721c26bfc.tar.bz2
cgraph.h (cgraph_node): New method expand_all_artificial_thunks.
2014-12-05 Martin Jambor <mjambor@suse.cz> * cgraph.h (cgraph_node): New method expand_all_artificial_thunks. (cgraph_edge): New method redirect_callee_duplicating_thunks. * cgraphclones.c (duplicate_thunk_for_node): Donot expand newly created thunks. (redirect_edge_duplicating_thunks): Turned into edge method redirect_callee_duplicating_thunks. (cgraph_node::expand_all_artificial_thunks): New method. (create_clone): Call expand_all_artificial_thunks. * ipa-cp.c (perhaps_add_new_callers): Call redirect_callee_duplicating_thunks instead of redirect_callee. Also call expand_all_artificial_thunks. From-SVN: r218417
Diffstat (limited to 'gcc/cgraph.h')
-rw-r--r--gcc/cgraph.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/cgraph.h b/gcc/cgraph.h
index 04318f5..54ee748 100644
--- a/gcc/cgraph.h
+++ b/gcc/cgraph.h
@@ -908,6 +908,10 @@ public:
thunks that are not lowered. */
bool expand_thunk (bool output_asm_thunks, bool force_gimple_thunk);
+ /* Call expand_thunk on all callers that are thunks and analyze those
+ nodes that were expanded. */
+ void expand_all_artificial_thunks ();
+
/* Assemble thunks and aliases associated to node. */
void assemble_thunks_and_aliases (void);
@@ -1477,6 +1481,12 @@ struct GTY((chain_next ("%h.next_caller"), chain_prev ("%h.prev_caller"),
call expression. */
void redirect_callee (cgraph_node *n);
+ /* If the edge does not lead to a thunk, simply redirect it to N. Otherwise
+ create one or more equivalent thunks for N and redirect E to the first in
+ the chain. Note that it is then necessary to call
+ n->expand_all_artificial_thunks once all callers are redirected. */
+ void redirect_callee_duplicating_thunks (cgraph_node *n);
+
/* Make an indirect edge with an unknown callee an ordinary edge leading to
CALLEE. DELTA is an integer constant that is to be added to the this
pointer (first parameter) to compensate for skipping