summaryrefslogtreecommitdiff
path: root/gcc/cgraph.h
diff options
context:
space:
mode:
authorjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2014-12-05 11:06:26 +0000
committerjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2014-12-05 11:06:26 +0000
commitfe3c9f1edbf0e827ee9fd20ca7bc2a9748bba960 (patch)
tree5535b89bdfdb34a70839578dacb6e9d89a13a6df /gcc/cgraph.h
parent5b30676162710fa4dc98dd83677fd53650732b46 (diff)
downloadgcc-fe3c9f1edbf0e827ee9fd20ca7bc2a9748bba960.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@218417 138bc75d-0d04-0410-961f-82ee72b054a4
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 04318f58c7a..54ee7489416 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