summaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
authorkyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-18 13:26:06 +0000
committerkyukhin <kyukhin@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-18 13:26:06 +0000
commit39c98dee75836f564a5efd5df7ca25cd5b6dcdbf (patch)
tree43d6d2e3c39272c10953c9024618ac52bea882be /gcc/cgraph.c
parent5f3ec3a3021ddbd003a5e188894bec1d61233670 (diff)
downloadgcc-39c98dee75836f564a5efd5df7ca25cd5b6dcdbf.tar.gz
PR ipa/61800
gcc/ * cgraph.h (cgraph_node::create_indirect_edge): Add compute_indirect_info param. * cgraph.c (cgraph_node::create_indirect_edge): Compute indirect_info only when it is required. * cgraphclones.c (cgraph_clone_edge): Do not recompute indirect_info fore cloned indirect edge. gcc/testsuite/ * g++.dg/ipa/pr61800.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@214099 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 370a96a4bb1..cb49cdc9ef7 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -942,7 +942,8 @@ cgraph_allocate_init_indirect_info (void)
struct cgraph_edge *
cgraph_node::create_indirect_edge (gimple call_stmt, int ecf_flags,
- gcov_type count, int freq)
+ gcov_type count, int freq,
+ bool compute_indirect_info)
{
struct cgraph_edge *edge = cgraph_node::create_edge (this, NULL, call_stmt,
count, freq, true);
@@ -954,7 +955,8 @@ cgraph_node::create_indirect_edge (gimple call_stmt, int ecf_flags,
edge->indirect_info->ecf_flags = ecf_flags;
/* Record polymorphic call info. */
- if (call_stmt
+ if (compute_indirect_info
+ && call_stmt
&& (target = gimple_call_fn (call_stmt))
&& virtual_method_call_p (target))
{