Bug 23197 - Improve documentation on -fprofile-generate, -fprofile-use
Summary: Improve documentation on -fprofile-generate, -fprofile-use
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.0.2
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: documentation
Depends on:
Blocks: 71666
  Show dependency treegraph
 
Reported: 2005-08-02 14:08 UTC by Anton Blanchard
Modified: 2018-11-17 01:03 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-02-13 03:56:08


Attachments
Update profile option documentation (671 bytes, patch)
2005-08-02 14:25 UTC, Anton Blanchard
Details | Diff
Updated patch (673 bytes, patch)
2005-08-02 14:42 UTC, Anton Blanchard
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Blanchard 2005-08-02 14:08:03 UTC
I noticed -fprofile-generate and -fprofile-use dont have an up to date summary
of the options they enable. Patch follows.
Comment 1 Anton Blanchard 2005-08-02 14:25:04 UTC
Created attachment 9411 [details]
Update profile option documentation

Document all options that -fprofile-generate/-fprofile-usr select:

-fprofile-generate selects -fspeculative-prefetching
-fprofile-use selects -fprofile-values and -fspeculative-prefetching

I noticed -fprofile-generate does select -funroll-loops but I dont know why it
does (so didnt document it)
Comment 2 Andrew Pinski 2005-08-02 14:32:54 UTC
Subject: Re:  Improve documentation on -fprofile-generate, -fprofile-use


On Aug 2, 2005, at 10:25 AM, anton at samba dot org wrote:

>
> ------- Additional Comments From anton at samba dot org  2005-08-02 
> 14:25 -------
> Created an attachment (id=9411)
>  --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9411&action=view)
> Update profile option documentation
>
> Document all options that -fprofile-generate/-fprofile-usr select:
>
> -fprofile-generate selects -fspeculative-prefetching
> -fprofile-use selects -fprofile-values and -fspeculative-prefetching

No use/generate does not select -fspeculative-prefetching.  The code to
select it was disabled.


> I noticed -fprofile-generate does select -funroll-loops but I dont 
> know why it
> does (so didnt document it)

The reason why it turns on -funroll-loops is because unrolling happens
before profiling is done.  Though that was only true in 4.0.x.

-- Pinski

Comment 3 Anton Blanchard 2005-08-02 14:42:52 UTC
Created attachment 9414 [details]
Updated patch

As pinskia pointed out, -fspeculative-prefetching is not selected.
Comment 4 Andrew Pinski 2005-08-02 15:57:45 UTC
Confirmed, please send the patch to gcc-patches@ with a change log.
Comment 5 sandra 2018-11-17 00:53:48 UTC
Author: sandra
Date: Sat Nov 17 00:53:17 2018
New Revision: 266231

URL: https://gcc.gnu.org/viewcvs?rev=266231&root=gcc&view=rev
Log:
2018-11-16  Sandra Loosemore  <sandra@codesourcery.com>

	PR middle-end/23197

	gcc/
	* doc/invoke.texi (Optimize Options): Update options enabled by
	fprofile-generate, -fprofile-use, and -fauto-profile.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/doc/invoke.texi
Comment 6 sandra 2018-11-17 01:03:50 UTC
This is (finally) fixed on trunk.  The code has changed so much over the last 13 years that the attached patch was not helpful, so I went through opts.c and made sure the documentation matches the code.  I also fixed -fauto-profile, which shares most of the same logic as -fprofile-use.