[Bug middle-end/35544] Error with -fprofile-use
wilson at tuliptree dot org
gcc-bugzilla@gcc.gnu.org
Thu Mar 13 06:02:00 GMT 2008
------- Comment #10 from wilson at tuliptree dot org 2008-03-13 06:02 -------
Subject: Re: New: Error with -fprofile-use
xinliangli at gmail dot com wrote:
> In the following example, profile data generated by -O0 binary run can not be
> used for profile-use at -O2. This is either a bug or design flaw if not
> supported.
Gcc constructs a minimal spanning tree for the CFG, and then only adds
instrumentation code to arcs that are not on the minimal spanning tree.
We can compute arc counts for the rest of the CFG from this set. We
can compute basic block execution counts from the arc counts. This
reduces the run-time cost of the instrumentation code, since only a
small fraction of the basic blocks require profiling code. However, it
also requires that we have exactly the same CFG with -fprofile-generate
as we have with -fprofile-use, and hence you must use the same
optimization options with both compiles.
Jim
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35544
More information about the Gcc-bugs
mailing list