Intel ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3 Manual page 169

Hide thumbs Also See for ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3:
Table of Contents

Advertisement

3.5.2
Data Interference
Data references with low interference probabilities and high path probabilities can make
the best use of data speculation. In the pseudo-code below, assume the probabilities
that the stores to *p1 and *p2 conflict with var are independent.
If the compiler advances the load from var above the stores to pointers p1 and p2,
then:
Prob that stores to p1 or p2 interfere with var
Given the interference probabilities above, there is a 58% probability at least one of p1
and p2 will interfere with a load from var if it is advanced above both of them. A
compiler can use traditional heuristics concerning data interference and interprocedural
memory access information to estimate these probabilities.
When advancing loads past function calls, the following should be considered:
• If a called function has many stores in it, it is more likely that actual or aliased ALAT
conflicts will occur.
• If other advanced loads are executed during the function call, it is possible that
their physical register numbers will either be identical or conflict with ALAT entries
allocated from calls in parent functions.
• If it is unknown whether a large number of advanced loads will be executed by the
called routines, then the possibility that the capacity of that ALAT may be exceeded
must be considered.
3.5.3
Optimizing Code Size
Part of the decision of when to speculate should involve consideration of any possible
increases in code size. Such consideration is not particular to speculation, but to any
transformations that cause code to be duplicated, such as loop unrolling, procedure
inlining, or tail duplication. Techniques to minimize code growth are discussed later in
this section.
In general, control speculation increases the dynamic code size of a program since
some of the speculated instructions are executed and their results are never used.
Recovery code associated with control speculation primarily contributes to the static
size of the binary since it is likely to be placed out-of-line and not brought into cache
until a speculative computation fails (uncommon for control speculation).
Data speculation has a similar effect on code size except that it is less likely to compute
values that are never used since most non-control speculative data speculative loads
will have their results checked. Also, since control speculative loads only fail in
uncommon situations such as deferred data related faults (depending on operating
system configuration), while data speculative loads can fail due to ALAT conflicts, actual
1:158
*p1 =
/* Prob interference = 0.30 */
. . .
*p2 =
/* Prob interference = 0.40 */
. . .
= var
/* Load to be advanced */
= 1.0 - (Prob p1 will not interfere with var *
Prob p2 will not interfere with var)
= 1.0 - (0.70 * 0.60)
= 0.58
Volume 1, Part 2: Memory Reference

Advertisement

Table of Contents
loading

This manual is also suitable for:

Itanium architecture 2.3

Table of Contents