EasyManua.ls Logo

Intel i960 - Page 335

Intel i960
347 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
Loading...
i960 Compiler User's Guide
Glossary-4
strength reduction
An optimization that substitutes expensive operations such
as multiplications with low-cost operations such as
addition or subtraction. Strength reduction also eliminates
unnecessary induction variables. For example, consider the
following C code fragment:
int v, a[10], j, t4, t5;
. . .
do {
j = j - 1;
t4 = 4 * j;
t5 = a[t4];
} while ( t5 > v );
Note that the values of j and t4 remain in lock-step; every
time the value of
j decreases by 1, that of t4 decreases by
4. Such identifiers are called induction variables. When
there are two or more induction variables in the loop, it
may be possible to get rid of all but one. For example, the
compiler might optimize the loop above to:
t4 = 4 * j;
do {
t4 = t4 - 4;
t5 = a[t4];
} while ( t5 > v );
Note that, the above optimization gets rid of the induction
variable
j and reduces an expensive multiply operation
with a subtract operation (i.e., performs strength
reduction).
tail call
A call that immediately precedes the return to the calling
function.
unreachable code
Code that can never execute because the flow-of-control
bypasses it.

Table of Contents

Related product manuals