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 middle-end/35544] Error with -fprofile-use



------- 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


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