summaryrefslogtreecommitdiff
path: root/gcc/ipa-inline-analysis.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-12 09:24:18 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2015-01-12 09:24:18 +0000
commit1a92a53529e423598ac5a2cc1a848af4c64edc28 (patch)
tree993913a7158e643f48bf7e882b92891566a2049e /gcc/ipa-inline-analysis.c
parent53dbeec184ca776c06d93f804a9e88a8c404103d (diff)
downloadgcc-1a92a53529e423598ac5a2cc1a848af4c64edc28.tar.gz
PR ipa/63470
* ipa-inline-analysis.c (inline_edge_duplication_hook): Adjust cost when edge becomes direct. * ipa-prop.c (make_edge_direct): Do not adjust when speculation is resolved or when introducing new speculation. * testsuite/g++.dg/ipa/pr63470.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219451 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-inline-analysis.c')
-rw-r--r--gcc/ipa-inline-analysis.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c
index 92858dad360..ec91d8ec9af 100644
--- a/gcc/ipa-inline-analysis.c
+++ b/gcc/ipa-inline-analysis.c
@@ -1312,6 +1312,13 @@ inline_edge_duplication_hook (struct cgraph_edge *src,
info->predicate = NULL;
edge_set_predicate (dst, srcinfo->predicate);
info->param = srcinfo->param.copy ();
+ if (!dst->indirect_unknown_callee && src->indirect_unknown_callee)
+ {
+ info->call_stmt_size -= (eni_size_weights.indirect_call_cost
+ - eni_size_weights.call_cost);
+ info->call_stmt_time -= (eni_time_weights.indirect_call_cost
+ - eni_time_weights.call_cost);
+ }
}