http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57182



             Bug #: 57182

           Summary: Documentation implies -fprofile-arcs required to

                    create .text.unlikely sections

    Classification: Unclassified

           Product: gcc

           Version: unknown

            Status: UNCONFIRMED

          Severity: minor

          Priority: P3

         Component: c

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: ru...@rustcorp.com.au





>From info file (unchanged since before 4.4):



`-freorder-functions'

     Reorder functions in the object file in order to improve code

     locality.  This is implemented by using special subsections

     `.text.hot' for most frequently executed functions and

     `.text.unlikely' for unlikely executed functions.  Reordering is

     done by 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 in to make this option

     effective.  See `-fprofile-arcs' for details.



But -freorder-functions creates those sections without -fprofile-arcs for

functions with attributes "hot" or "cold". So the last paragraph is

misleading/obsolete.   Does it really mean:



     The compiler relies on function attributes or profile feedback to

     determine how frequently functions are executed.  See `-fprofile-arcs'

     for details.



?



Thanks,

Rusty.

Reply via email to