This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/59639] Code in a cold basic block is not pushed to .text.unlikely


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Avi Kivity from comment #2)
> (In reply to Andrew Pinski from comment #1)
> > The option you want is -freorder-blocks-and-partition but it only does
> > something when there are real profiling info (aka
> > -fprofile-generate/-fprofile-use).
> 
> No.  The function slow_path() will be placed in .text.unlikely, without
> -freorder-blocks-and-partition, so gcc already knows about cold paths even
> without this option.
> 
> Adding -freorder-blocks-and-partition does not change the output, even
> though gcc knows the probability even without profiling information.

As I said before, you need to use -fprofile-generate/-fprofile-use with that
option.  See bug 26493 which this is a duplicate of that one.

> 
> This is similar to __builtin_expect(), except that I cannot use
> __builtin_expect() with asm goto.

*** This bug has been marked as a duplicate of bug 26493 ***


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]