diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-03-26 02:11:57 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-03-26 02:11:57 +0000 |
commit | 5a7ad25306b167d5b9a494a776aef7df1ec2412c (patch) | |
tree | 58c27722a6391d91e8bbfcb902c1edc28e754d14 /gcc/cgraphclones.c | |
parent | ce2d198d93cf01609d4d18ce934efacc0cf21b5b (diff) | |
download | gcc-5a7ad25306b167d5b9a494a776aef7df1ec2412c.tar.gz |
PR ipa/60315
* cif-code.def (UNREACHABLE) New code.
* ipa-inline.c (inline_small_functions): Skip edges to __builtlin_unreachable.
(estimate_edge_growth): Allow edges to __builtlin_unreachable.
* ipa-inline-analysis.c (edge_set_predicate): Redirect edges with false
predicate to __bulitin_unreachable.
(set_cond_stmt_execution_predicate): Fix issue when invert_tree_comparison
returns ERROR_MARK.
* ipa-pure-const.c (propagate_pure_const, propagate_nothrow): Do not
propagate to inline clones.
* cgraph.c (verify_edge_corresponds_to_fndecl): Allow redirection
to unreachable.
* ipa-cp.c (create_specialized_node): Be ready for new node to appear.
* cgraphclones.c (cgraph_clone_node): If call destination is already
ureachable, do not redirect it back.
* tree-inline.c (fold_marked_statements): Hanlde calls becoming
unreachable.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208831 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphclones.c')
-rw-r--r-- | gcc/cgraphclones.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cgraphclones.c b/gcc/cgraphclones.c index ca69033ddde..b2eb8ab5ce9 100644 --- a/gcc/cgraphclones.c +++ b/gcc/cgraphclones.c @@ -238,8 +238,12 @@ cgraph_clone_node (struct cgraph_node *n, tree decl, gcov_type count, int freq, FOR_EACH_VEC_ELT (redirect_callers, i, e) { /* Redirect calls to the old version node to point to its new - version. */ - cgraph_redirect_edge_callee (e, new_node); + version. The only exception is when the edge was proved to + be unreachable during the clonning procedure. */ + if (!e->callee + || DECL_BUILT_IN_CLASS (e->callee->decl) != BUILT_IN_NORMAL + || DECL_FUNCTION_CODE (e->callee->decl) != BUILT_IN_UNREACHABLE) + cgraph_redirect_edge_callee (e, new_node); } |