auto-profile.c (afdo_indirect_call): Skip generating histogram value for internal...
authorBin Cheng <bin.cheng@linux.alibaba.com>
Fri, 14 Dec 2018 05:42:56 +0000 (05:42 +0000)
committerBin Cheng <amker@gcc.gnu.org>
Fri, 14 Dec 2018 05:42:56 +0000 (05:42 +0000)
* auto-profile.c (afdo_indirect_call): Skip generating histogram
value for internal call.

From-SVN: r267120

gcc/ChangeLog
gcc/auto-profile.c

index b59574863b3634826c15dceef859e58b7801a930..cb5824a7caffcc1e9acc2c06b437b5b5861ad664 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 7e0020bc232756f4a04e709c64bbcd04838a8eb1..f51a4bf4ce111bee1f2ee21c2a6218d8e2b79efb 100644 (file)
@@ -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);