This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/59639] Code in a cold basic block is not pushed to .text.unlikely
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 30 Dec 2013 19:07:01 +0000
- Subject: [Bug rtl-optimization/59639] Code in a cold basic block is not pushed to .text.unlikely
- Auto-submitted: auto-generated
- References: <bug-59639-4 at http dot gcc dot gnu dot org/bugzilla/>
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 ***