diff options
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index ecb234d..72d7cb5 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -63,6 +63,7 @@ along with GCC; see the file COPYING3. If not see #include "attribs.h" #include "selftest.h" #include "tree-into-ssa.h" +#include "ipa-inline.h" /* FIXME: Only for PROP_loops, but cgraph shouldn't have to know about this. */ #include "tree-pass.h" @@ -1470,6 +1471,16 @@ cgraph_edge::redirect_call_stmt_to_callee (cgraph_edge *e) || decl == e->callee->decl) return e->call_stmt; + if (decl && ipa_saved_clone_sources) + { + tree *p = ipa_saved_clone_sources->get (e->callee); + if (p && decl == *p) + { + gimple_call_set_fndecl (e->call_stmt, e->callee->decl); + return e->call_stmt; + } + } + if (flag_checking && decl) { cgraph_node *node = cgraph_node::get (decl); |