aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/auto-profile.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b595748..cb5824a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2018-12-14 Bin Cheng <bin.cheng@linux.alibaba.com>
+ * auto-profile.c (afdo_indirect_call): Skip generating histogram
+ value for internal call.
+
+2018-12-14 Bin Cheng <bin.cheng@linux.alibaba.com>
+
* auto-profile.c (AFDO_EINFO): New macro.
(class edge_info): New class.
(is_edge_annotated, set_edge_annotated): Delete.
diff --git a/gcc/auto-profile.c b/gcc/auto-profile.c
index 7e0020b..f51a4bf 100644
--- a/gcc/auto-profile.c
+++ b/gcc/auto-profile.c
@@ -987,7 +987,9 @@ afdo_indirect_call (gimple_stmt_iterator *gsi, const icall_target_map &map,
if (map.size () == 0)
return;
gcall *stmt = dyn_cast <gcall *> (gs);
- if ((!stmt) || gimple_call_fndecl (stmt) != NULL_TREE)
+ if (!stmt
+ || gimple_call_internal_p (stmt)
+ || gimple_call_fndecl (stmt) != NULL_TREE)
return;
callee = gimple_call_fn (stmt);