IBM 990 User Manual

Page 56

Advertising
background image

44

IBM

^

zSeries 990 Technical Guide

Processor Branch History Table (BHT)

The Branch History Table (BHT) implementation on processors has a key performance
improvement effect. The BHT was originally introduced on the IBM ES/9000® 9021 in 1990
and has been improved ever since.

The z990 server BHT offers significant branch performance benefits. The BHT allows each
CP to take instruction branches based on a stored BHT, which improves processing times for
calculation routines. Using a 100-iteration calculation routine as an example (Figure 2-14),
the hardware preprocesses the branch incorrectly 99 times without a BHT. With a BHT, it
preprocesses branch correctly 98 times.

Figure 2-14 Branch History Table (BHT)

Without BHT, the processor:

– Makes an incorrect branch guess the first time through the loop (at the second branch

point in Figure 2-14).

– Preprocesses instructions for the guessed branch path.

– Starts preprocessing a new path if the branch not equal to the guess.

– Repeats this 98 more times until the last time, when the guess matches the actual

branch taken

With BHT, the processor:

– Makes an incorrect branch guess the first time through the loop (at the second branch

point in Figure 2-14).

– Preprocesses instructions for the guessed branch path.

– Starts preprocessing a new path if the branch is not equal to the guess.

– Updates the BHT to indicate the last branch action taken at this address.

– The next 98 times, the branch path comes from the BHT.

– The last time, the guess is wrong.

The key point is that, with the BHT, the table is updated to indicate the last branch action
taken at branch addresses. Using the BHT, if a hardware branch at an address matches a
BHT entry, the branch direction is taken from the BHT. Therefore, in the diagram, the
branches are correct for the remainder of the loop through the program routine, except for the
last one.

Without BHT:

Hardware branch

guess OK

Hardware branch

guess not OK
99 of 100 times

Guess Path

Actual Path

Hardware branch guess OK

Hardware branch

guess OK
98 of 100 times

Guess Path

Actual Path

With BHT:

Advertising