[GOOGLE] Do not promote indirect call for AutoFDO in the callee body definition is not available

Dehao Chen dehao@google.com
Tue Dec 16 22:39:00 GMT 2014


This patch fixes the bug for undefined symbol in AutoFDO build.

Testing on going. OK for google-4_9 branch?

Thanks,
Dehao

Index: gcc/auto-profile.c
===================================================================
--- gcc/auto-profile.c (revision 218784)
+++ gcc/auto-profile.c (working copy)
@@ -592,6 +592,8 @@
  continue;
       if (!check_ic_target (stmt, node))
  continue;
+      if (!node->definition)
+        continue;
       (*map)[callee] = iter->second->total_count ();
       ret += iter->second->total_count ();
     }



More information about the Gcc-patches mailing list