[doc,committed] document that -freorder-functions also uses hot/cold attributes

Message ID fc4a7770-36e6-0aa2-1e5f-372733b842f1@codesourcery.com
State New
Headers show
  • [doc,committed] document that -freorder-functions also uses hot/cold attributes
Related show

Commit Message

Sandra Loosemore Nov. 26, 2018, 6:23 p.m.
I've checked in this patch for PR 57182.



Index: gcc/doc/invoke.texi
--- gcc/doc/invoke.texi	(revision 266472)
+++ gcc/doc/invoke.texi	(working copy)
@@ -9796,8 +9796,9 @@  subsections @code{.text.hot} for most fr
 the linker so object file format must support named sections and linker must
 place them in a reasonable way.
-Also profile feedback must be available to make this option effective.  See
-@option{-fprofile-arcs} for details.
+This option isn't effective unless you either provide profile feedback
+(see @option{-fprofile-arcs} for details) or manually annotate functions with 
+@code{hot} or @code{cold} attributes (@pxref{Common Function Attributes}).
 Enabled at levels @option{-O2}, @option{-O3}, @option{-Os}.