This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
do -fprofile-arcs and -fbranch-probabilities help to set bb->count?
- From: "Liu Haibin" <liu dot haibin at gmail dot com>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 21 Feb 2006 18:19:44 +0800
- Subject: do -fprofile-arcs and -fbranch-probabilities help to set bb->count?
Hi,
I wanted to use bb->count, so I expected that -fprofile-arcs and
-fbranch-probabilities would help. I added printf just before
peephole2 optimization and ran the following.
$gcc -O3 -fprofile-arcs test.c -o test
$./test (which produced test.gcno only, but no test.gcda)
$gcc -O3 -fprofile-arcs -fbranch-probabilities test.c -o test
But it turned out that all the basic block counts were 0. Any idea how
I can see bb->count set.
Regards,
Haibin