EasyManuals Logo

Sun Microsystems UltraSPARC-I User Manual

Sun Microsystems UltraSPARC-I
410 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #286 background imageLoading...
Page #286 background image
Sun Microelectronics
271
16. Code Generation Guidelines
Figure 16-9 Cost of a Mispredicted Branch (Shaded Area)
It should be obvious from Figure 16-9 how expensive badly behaved branches are
for UltraSPARC. Special consideration should be given to moving hard to predict
branches after highly predictable branches based on profiling, and to combining
conditions to make branches more predictable. Finally, if it is determined that
two or more branches are correlated, it may be desirable to duplicate common
blocks and thus have separate branch predictions for hard to predict branches.
For example in Figure 16-10, if the outcome of branch A, which is executed before
branch B, has an impact on the direction on branch B, then it is desirable to split
the code and duplicate the branch.
Figure 16-10 Branch Transformation to Reduce Mispredicted Branches
bicc FDGECN
1
N
2
N
3
W
delay FDGECN
1
N
2
N
3
W
instr1F DGECN
1
N
2
N
3
W
instr2F DGECN
1
N
2
N
3
W
grp1 FDGECN
1
N
2
N
3
W
grp2 FDGECN
1
N
2
N
3
W
grp3 FDGECN
1
N
2
N
3
W
grp4 FDGECN
1
N
2
N
3
W
instr1 (correct) FDGECN
1
N
2
N
3
W
... ...
branch A
block 1 block 2
block 3
branch B
Hard to Predict
branch A
block 1 block 2
block 3 block 3
branch B branch C
Predictable Predictable
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Sun Microsystems UltraSPARC-I and is the answer not in the manual?

Sun Microsystems UltraSPARC-I Specifications

General IconGeneral
BrandSun Microsystems
ModelUltraSPARC-I
CategoryComputer Hardware
LanguageEnglish