EasyManua.ls Logo

Intel i960 - Loop Unrolling

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...
Optimization
11-15
11
Multiplication is a time-consuming operation. To generate faster code, the
compiler can sometimes replace the multiply operation with an add
operation.
These methods improve the performance of the code whenever a value
computed in a loop is a linear function of a loop iteration variable.
Indexing arrays is the most common case.
Loop Unrolling
When the number of times a loop executes can be determined either at
compile time, or prior to executing the loop at run time, then this
optimization may be performed. Loop unrolling involves duplicating the
body of a loop 1 or more times, and changing the loop conditions so that
the same number of executions of the loop body occur. This optimization
is chosen based on many factors. Two such factors are the size of the loop
body and the complexity of the loop termination condition.
Memory Optimizations
Global Alias Analysis
The compiler gathers information about the interaction between loads and
stores in the program. With this information, the compiler can remove
some of the redundant load-store operations. Assignments into an array
are one applicable case.
Two names are aliases when they both reference the same memory
location. Without tracing the relationships of values and names, the
compiler must treat any value stored through a pointer, called an indirect
store, as if it affected any memory location.

Table of Contents

Related product manuals