* predict.c (choose_function_section): Avoid choice for linkonce functions.
authorJan Hubicka <jh@suse.cz>
Thu, 3 Oct 2002 19:43:00 +0000 (21:43 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Thu, 3 Oct 2002 19:43:00 +0000 (19:43 +0000)
From-SVN: r57785

gcc/ChangeLog
gcc/predict.c

index 947fcccd8f65571ecd2b049e9d610bc30c0a07e8..1ad35bd706271737a229ea93e6344c6a8f209fab 100644 (file)
@@ -1,3 +1,7 @@
+Thu Oct  3 21:42:20 CEST 2002  Jan Hubicka  <jh@suse.cz>
+
+       * predict.c (choose_function_section): Avoid choice for linkonce functions.
+
 Thu Oct  3 15:15:00 CEST 2002  Jan Hubicka  <jh@suse.cz>
 
        * i386.md (lea to mul peep2): Fix condition.
index 7d94deafa8dc888dba5d1497723d22fc7e30db6e..844366aeeff9e3193c61fe31f9010744b2e13282 100644 (file)
@@ -1247,7 +1247,12 @@ static void
 choose_function_section ()
 {
   if (DECL_SECTION_NAME (current_function_decl)
-      || !targetm.have_named_sections)
+      || !targetm.have_named_sections
+      /* Theoretically we can split the gnu.linkonce text section too,
+        but this requires more work as the frequency needs to match
+        for all generated objects so we need to merge the frequency
+        of all instances.  For now just never set frequency for these.  */
+      || !DECL_ONE_ONLY (current_function_decl))
     return;
   if (cfun->function_frequency == FUNCTION_FREQUENCY_HOT)
     DECL_SECTION_NAME (current_function_decl) =