Sun Microelectronics
270
UltraSPARC User’s Manual
Assuming that a specific branch can only be predicted with 50% accuracy (basi-
cally, it is not predicted), the compiler must balance the two cycle penalty on av-
erage for the mispredicted branch case vs. the ability to schedule other
instructions around MOVcc (the SETcc cycle and the two groups after MOVcc,
since MOVcc is a single instruction group). The need for multiple MOVcc instruc-
tions to guard multiple operations also must be taken into account.
16.2.7 I-Cache Utilization
Grouping blocks that are executed frequently can effectively increase the appar-
ent size of the I-Cache. Cache studies have shown that it is not uncommon to
have half of the entries in the I-Cache that are never executed. By placing rarely
executed code out of a line containing a block identified as frequently executed
by profiling, better I-Cache utilization can be achieved.
16.2.8 Handling of CTI couples
UltraSPARC handles CTI couples by taking a “false” trap on the second CTI. It
processes the first CTI, executes instructions until the second CTI reaches the N
3
stage, squashes all instructions executed after the first CTI, and executes instruc-
tions starting with the second CTI. Nine cycles are lost when CTI couples are en-
countered, which should discourage their use.
16.2.9 Mispredicted Branches
The dynamic branch prediction mechanism used for UltraSPARC can generally
achieve a success rate of 87% for integer programs and around 93% for floating-
point programs (SPEC92). Correctly predicted conditional branches allow the
processor to group instructions from adjacent basic blocks and continue progress
speculatively until the branch is resolved. The capability to execute instructions
speculatively is a significant performance boost for UltraSPARC. On the other
hand, when a branch is mispredicted, up to 18 instructions can be cancelled; This
is the case when two instructions from the current group are cancelled along with
4 groups of 4 instructions, as shown in Figure 16-9 (costly, but fortunately this
one case is very rare).
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com