Intel i960 User Manual page 335

Processor compiler
Hide thumbs Also See for i960:
Table of Contents

Advertisement

i960 Compiler User's Guide
strength reduction
tail call
unreachable code
Glossary-4
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
time the value of
decreases by 1, that of
j
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
and reduces an expensive multiply operation
j
with a subtract operation (i.e., performs strength
reduction).
A call that immediately precedes the return to the calling
function.
Code that can never execute because the flow-of-control
bypasses it.
and
remain in lock-step; every
j
t4
t4
decreases by

Advertisement

Table of Contents
loading

Table of Contents