aboutsummaryrefslogtreecommitdiff
path: root/gcc/auto-profile.c
diff options
context:
space:
mode:
authorBin Cheng <bin.cheng@linux.alibaba.com>2018-12-14 05:42:56 +0000
committerBin Cheng <amker@gcc.gnu.org>2018-12-14 05:42:56 +0000
commit7f3477fb787cc885bfb11d2e8c8dae675a3129d0 (patch)
treeb4b50ae79108c57bfbfab1501bb37d72e35781f4 /gcc/auto-profile.c
parent47b4c53f035502f1140ae6e286c4576faa57c7ea (diff)
auto-profile.c (afdo_indirect_call): Skip generating histogram value for internal call.
* auto-profile.c (afdo_indirect_call): Skip generating histogram value for internal call. From-SVN: r267120
Diffstat (limited to 'gcc/auto-profile.c')
-rw-r--r--gcc/auto-profile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/auto-profile.c b/gcc/auto-profile.c
index 7e0020bc232..f51a4bf4ce1 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);