> > Ok, I have just verified that gcc DOES accept the -fsched2-use-tracer and > invoke the ebb scheduler as expected. However, it does not set the > flag_branch_probabilities automatically. It only sets it when I > explicitly use the -fbranch-probabilities command-line switch. Here are > the two cases that I have tried: > > g++ -O3 -fsched2-use-traces > Generates ~151K superblocks on my benchmark suite with lots of large > superblocks that include 10 basic blocks or more > > g++ -O3 -fsched2-use-traces -fbranch-probabilities > Generates only ~123K superblocks on my benchmark suite with the vast > majority of superblocks consisting of less than 10 basic blocks -fbranch-probabilities can be accpeted only when program has been earlier profiled. GCC does have logic for statically guessing the branch outcomes when these are not available (-fguess-branch-probability) so the superblocks can be built, just they are inferrior to those built with feedback available. > > So, the question is: Why did the compiler generate more superblocks > when branch probabilities were not computed? Do the superblocks generated > in that case make any sense? > And the bottom line question for me is: which setting should I use in my > research on superblocks? It is always better to use the profile, so I would recommend you -fbranch-probabilities unless you are interested in experiments with static prediction algorithms. Honza