Paul Clayton <[email protected]> posted:
On 11/5/25 3:43 PM, MitchAlsup wrote:
[snip]
I am now working on predictors for a 6-wide My 66000 machine--which is a bit
different.
a) VEC-LOOP loops do not alter the branch prediction tables.
b) Predication clauses do not alter the BPTs.
Not recording the history of predicates may have a negative
effect on global history predictors. (I do not know if anyone
has studied this, but it has been mentioned — e.g.,
"[predication] has a negative side-effect because the removal
of branches eliminates useful correlation information
necessary for conventional branch predictors" from "Improving
Branch Prediction and Predicated Execution in Out-of-Order
Processors", Eduardo Quiñones et al., 2007.)
It depends on where you are looking! If you think branch prediction
alters where FETCH is Fetching, then MY 66000 predication does not
do predication prediction--predication is used when the join point
will have already been fetched by the time the condition is known.
Then, either the then clause or the else clause will be nullified
without backup (i.e., branch prediction repair).
DECODE is still able to predict then-clause versus else-clause
and maintain the no-backup property, as long as both sides are
issued into the execution window.
Predicate prediction can also be useful when the availability
of the predicate is delayed. Similarly, selective eager
execution might be worthwhile when the predicate is delayed;
the selection is likely to be predictive (resource use might
be a basis for selection but even estimating that might be
predictive).
The difference is that predication prediction never needs branch
prediction repair.
MitchAlsup <[email protected]d> schrieb:
Paul Clayton <[email protected]> posted:
On 11/5/25 3:43 PM, MitchAlsup wrote:
[snip]
I am now working on predictors for a 6-wide My 66000 machine--which is a bit
different.
a) VEC-LOOP loops do not alter the branch prediction tables.
b) Predication clauses do not alter the BPTs.
Not recording the history of predicates may have a negative
effect on global history predictors. (I do not know if anyone
has studied this, but it has been mentioned — e.g.,
"[predication] has a negative side-effect because the removal
of branches eliminates useful correlation information
necessary for conventional branch predictors" from "Improving
Branch Prediction and Predicated Execution in Out-of-Order
Processors", Eduardo Quiñones et al., 2007.)
It depends on where you are looking! If you think branch prediction
alters where FETCH is Fetching, then MY 66000 predication does not
do predication prediction--predication is used when the join point
will have already been fetched by the time the condition is known.
Then, either the then clause or the else clause will be nullified
without backup (i.e., branch prediction repair).
DECODE is still able to predict then-clause versus else-clause
and maintain the no-backup property, as long as both sides are
issued into the execution window.
Predicate prediction can also be useful when the availability
of the predicate is delayed. Similarly, selective eager
execution might be worthwhile when the predicate is delayed;
the selection is likely to be predictive (resource use might
be a basis for selection but even estimating that might be
predictive).
The difference is that predication prediction never needs branch
prediction repair.
What happens to the instructions after the predicate?
Let's say we have
[...]
peq0 r1,tf
mov r2,#24
mov r2,#48
ldd r3,[r4,r2,0]
[...]
can the ldd be speculatively executed or not? like::
And what happens if the prediction was wrong?
Thomas Koenig <[email protected]> posted:
Let's say we have
[...]
peq0 r1,tf
mov r2,#24
mov r2,#48
ldd r3,[r4,r2,0]
[...]
can the ldd be speculatively executed or not? like::
peq0 r1,tf
ldd r3,[r4,#24]
ldd r3,[r4,#28]
And what happens if the prediction was wrong?
Some form of backup and do it right, along with some form of
not updating the cache on the one which was not supposed to
be executed {or TLB or L2}.
MitchAlsup <[email protected]d> schrieb:
Thomas Koenig <[email protected]> posted:
Let's say we have
[...]
peq0 r1,tf
mov r2,#24
mov r2,#48
ldd r3,[r4,r2,0]
[...]
can the ldd be speculatively executed or not? like::
peq0 r1,tf
ldd r3,[r4,#24]
ldd r3,[r4,#28]
Yes, that can be simplified.
Could the load in the original be speculatively executed?
And what happens if the prediction was wrong?
Some form of backup and do it right, along with some form of
not updating the cache on the one which was not supposed to
be executed {or TLB or L2}.
Does your answer apply to my original code or to the one
that you posted?
If it only applies to the latter, I can
easily make up an example that cannot be simplified the
way you did (let's take that as a given).
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,114 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 492513:50:01 |
| Calls: | 14,267 |
| Calls today: | 3 |
| Files: | 186,320 |
| D/L today: |
26,858 files (8,724M bytes) |
| Messages: | 2,518,447 |