diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2015-04-03 20:19:53 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2015-04-03 18:19:53 +0000 |
commit | 872ceb28a1be6a4ddd95d733083f4823ff7548e1 (patch) | |
tree | 8d624aba77b9fad20f427e2231dea30cad83be8c /gcc/ipa-inline-analysis.c | |
parent | 133a84abb68641cf444e41f5f0e1682a9e4e0e0d (diff) | |
download | gcc-872ceb28a1be6a4ddd95d733083f4823ff7548e1.zip gcc-872ceb28a1be6a4ddd95d733083f4823ff7548e1.tar.gz gcc-872ceb28a1be6a4ddd95d733083f4823ff7548e1.tar.bz2 |
re PR ipa/65655 (ICE in speculative_call_info, at cgraph.c:1151)
PR ipa/65655
* ipa-inline-analysis.c (edge_set_predicate): Do not redirect
speculative indirect edges to avoid ordering issue.
* g++.dg/torture/pr65655.C: New testcase.
From-SVN: r221860
Diffstat (limited to 'gcc/ipa-inline-analysis.c')
-rw-r--r-- | gcc/ipa-inline-analysis.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c index 2f4eb9f..5d99887 100644 --- a/gcc/ipa-inline-analysis.c +++ b/gcc/ipa-inline-analysis.c @@ -793,7 +793,11 @@ edge_set_predicate (struct cgraph_edge *e, struct predicate *predicate) { /* If the edge is determined to be never executed, redirect it to BUILTIN_UNREACHABLE to save inliner from inlining into it. */ - if (predicate && false_predicate_p (predicate)) + if (predicate && false_predicate_p (predicate) + /* When handling speculative edges, we need to do the redirection + just once. Do it always on the direct edge, so we do not + attempt to resolve speculation while duplicating the edge. */ + && (!e->speculative || e->callee)) e = redirect_to_unreachable (e); struct inline_edge_summary *es = inline_edge_summary (e); |