analyze_branches
tool to produce summary.
We tested our results on SPECint2000 suite, a representative collection of programs run on nowadays computers. Since we used the same set of programs for specifying weights of individual heuristics, we decided to test SPECfp2000 suite to cross check our predictor on different code.
Programs contained in SPECfp differ dramatically from the ones in SPECint by both purpose and language. Many SPECfp programs solve numerical problems and are written in Fortran, while SPECint programs are written in C and C++.
We tested only subset of SPECfp tests, because some of them are written in f90 Fortran dialect that is not supported by GCC yet.
|
The column, called ``branches'' specifies number of conditional jumps in all compiled programs predicted by given heuristic in both absolute and relative form.
One can see that SPECint contains 88411 conditionals and we predicted of them using strong heuristics and using weak heuristics. We failed to predict of branches. SPECfp contains 20079 conditionals and we predicted of them using the strong heuristics and using weak heuristics. We failed to predict of branches.
More important information than static instructions counts are the dynamic instruction counts--counts weighted by actual number of executions of each instruction in the train run. The values are presented in last column again in both absolute and relative form.
In SPECint we predicted of executed instructions by strong heuristics and by weak heuristics, that is in sharp contrast to static instruction counts. We failed to predict of instructions. In SPECfp the numbers are even more biased in same direction-- for strong heuristics, for weak heuristics, and unpredicted.
The hitrate column presents probably the most important value--the probability that conditional jump will go in the direction predicted by heuristics. We present only the dynamic numbers. For SPECint we predicted of branches correctly and in SPECfp even almost 10.1. This compares well to hitrate we measured by exact re-implementation of Ball and Larus [3] heuristics10.2 that our work is based on and to roughly hitrates reported by more expensive branch prediction methods based on intra-procedural weighted value range propagation [5] not yet cheap enough for production compilers.
Strong heuristics were very successful-- in both cases, while DS theory reached about success.
Last column represents values theoretically reachable by perfect static predictor that always predict branch in its more probable direction. So upper bound of hitrate for static branch prediction methods is about , but it is unrealistic to expect this to be reached without profile feedback.
We would like also to point out that many of our new heuristics are very accurate--for instance the return value based ones. Also splitting single opcode heuristic to multiple ones helped us to increase the hitrate of ``value positive'' heuristic.
Finally figure shows comparisons of hitrates of our combined heuristics and perfect predictor on each of SPECint2000 benchmarks. As can be easily seen, the sucesfulness of our method varies from program to program, but in all cases it has at least slightly successful.
We found that some of optimizers needs to be modified for properties of estimated profiles. For instance estimated profile almost always predict loop to have relatively few iterations making loop peeling too active, but overall almost all optimizations implemented for profile feedback derive some benefit from estimated profile too as shown in next chapter.
Jan Hubicka 2003-05-04