]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
tree-profile.c (tree_profiling): Skip external functions when doing coverage instrume...
authorJan Hubicka <hubicka@ucw.cz>
Thu, 21 Aug 2014 06:18:48 +0000 (08:18 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 21 Aug 2014 06:18:48 +0000 (06:18 +0000)
* tree-profile.c (tree_profiling): Skip external functions
when doing coverage instrumentation.
* cgraphunit.c (compile): Do not assert that all nodes are reachable.

* gcc.dg/ipa/ctor-empty-1.c: Update template.

From-SVN: r214256

gcc/ChangeLog
gcc/cgraphunit.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/ipa/ctor-empty-1.c
gcc/tree-profile.c

index e997a32f19549ab248d3fbe2b70181c29da4a84e..69a1d38a1ef9957152f2645fb6d9921b5423aa86 100644 (file)
@@ -1,3 +1,9 @@
+2014-08-20  Jan Hubicka  <hubicka@ucw.cz>
+
+       * tree-profile.c (tree_profiling): Skip external functions
+       when doing coverage instrumentation.
+       * cgraphunit.c (compile): Do not assert that all nodes are reachable.
+
 2014-08-20  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
        * config/rs6000/altivec.h (vec_cpsgn): New #define.
index 20294b3845a4ad3fbdfb126e8defc9686f0e09b1..0bbe9f68612a7a8ccea1438a7630a92f5f72e4ef 100644 (file)
@@ -2209,11 +2209,6 @@ compile (void)
   cgraph_materialize_all_clones ();
   bitmap_obstack_initialize (NULL);
   execute_ipa_pass_list (g->get_passes ()->all_late_ipa_passes);
-#ifdef ENABLE_CHECKING
-  symtab_node::verify_symtab_nodes ();
-  /* Verify late IPA passes cleaned up after themselves.  */
-  gcc_assert (!symtab_remove_unreachable_nodes (false, dump_file));
-#endif
   bitmap_obstack_release (NULL);
   mark_functions_to_output ();
 
index c5b9d83811c0664f3f7974ba8a9c16a0c959c12e..e1367e80bb6da32605213efc1328e963c272920f 100644 (file)
        * gcc.target/powerpc/swaps-p8-11.c: New test.
        * gcc.target/powerpc/swaps-p8-12.c: New test.
 
+2014-08-20  Jan Hubicka  <hubicka@ucw.cz>
+
+       * gcc.dg/ipa/ctor-empty-1.c: Update template.
+
 2014-08-20  Jan Hubicka  <hubicka@ucw.cz>
 
        * g++.dg/ipa/devirt-37.C: Fix testcase.
index bb8e7aff25d87e2b11af4bdda64cb74bf6e9c58b..e678c6d031528dece6b65c7475ab9c412ba453d9 100644 (file)
@@ -1,8 +1,8 @@
 /* { dg-do compile } */
-/* { dg-options "-O3 -c -fdump-ipa-cgraph"  } */
+/* { dg-options "-O3 -c -fdump-ipa-free-inline-summary"  } */
 static __attribute__((constructor))
 void empty_constructor()
 {
 }
-/* { dg-final { scan-ipa-dump "Reclaiming functions: empty_constructor"  "cgraph"  } } */
-/* { dg-final { cleanup-ipa-dump "cgraph" } } */
+/* { dg-final { scan-ipa-dump "Reclaiming functions: empty_constructor"  "free-inline-summary"  } } */
+/* { dg-final { cleanup-ipa-dump "free-inline-summary" } } */
index 6ab06e69c3f02a895bb286046a323bafbec5ac78..31d305b4e8d18f973b02619c72dfd84c252343fd 100644 (file)
@@ -578,6 +578,13 @@ tree_profiling (void)
       if (DECL_SOURCE_LOCATION (node->decl) == BUILTINS_LOCATION)
        continue;
 
+      /* Do not instrument extern inline functions when testing coverage.
+        While this is not perfectly consistent (early inlined extern inlines
+        will get acocunted), testsuite expects that.  */
+      if (DECL_EXTERNAL (node->decl)
+         && flag_test_coverage)
+       continue;
+
       push_cfun (DECL_STRUCT_FUNCTION (node->decl));
 
       /* Local pure-const may imply need to fixup the cfg.  */