This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -fprofile-arcs changes the structure of basic blocks
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: Liu Haibin <liu dot haibin at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 24 Jun 2005 01:08:32 +0200
- Subject: Re: -fprofile-arcs changes the structure of basic blocks
- References: <e538aa3e05062301475d19862a@mail.gmail.com>
Hello,
> I want to use profiling information. I know there're two relevent
> fields in each basic block, count and frequency. I want to use
> frequency because the compiled program is for another architecture so
> it cannot run on the host.
>
> I use -fprofile-arcs.
this does not make much sense to me. If you cannot run the compiled
program, adding instrumentation with -fprofile-arcs is useless. In this
case, you may just use the guessed frequencies (that you get by default
without any flags).
Zdenek
> And I can see the frequency value when I debug
> cc1. But I happen to realize that when I add -fprofile-arcs, it change
> the the whole structure of basic block. I compared the vcg output
> files with and without the -fprofile-arcs. I found they're totally
> different.
>
> My question is why it is so? I want to know the profiling info, but if
> profiling info I get is for another different structure of basic
> block, it's useless to me.
>
> Where do I go wrong here? Which option is the suitable in this case?
> The gcc version is 3.3.3. Thanks.
>
>
> Regards,
> Timothy