Enabling transformation
Encyclopedia
In computer science
, an enabling transformation is a compiler optimization
that increases the effectiveness of other compiler optimizations. Such an optimization may or may not improve program performance by itself, but it also alters the structure of the program in such a way that other optimizations may produce superior results. Typical enabling transformations include:
Computer science
Computer science or computing science is the study of the theoretical foundations of information and computation and of practical techniques for their implementation and application in computer systems...
, an enabling transformation is a compiler optimization
Compiler optimization
Compiler optimization is the process of tuning the output of a compiler to minimize or maximize some attributes of an executable computer program. The most common requirement is to minimize the time taken to execute a program; a less common one is to minimize the amount of memory occupied...
that increases the effectiveness of other compiler optimizations. Such an optimization may or may not improve program performance by itself, but it also alters the structure of the program in such a way that other optimizations may produce superior results. Typical enabling transformations include:
- Inline expansionInline expansionIn computing, inline expansion, or inlining, is a manual or compiler optimization that replaces a function call site with the body of the callee. This optimization may improve time and space usage at runtime, at the possible cost of increasing the final size of the program In computing, inline...
: By inserting the body of a function in place of its call site, a large collection of intraprocedural optimizations such as dead code eliminationDead code eliminationIn compiler theory, dead code elimination is a compiler optimization to remove code which does not affect the program results. Removing such code has two benefits: it shrinks program size, an important...
, loop-invariant code motionLoop-invariant code motionIn computer programming, loop-invariant code consists of statements or expressions which can be moved outside the body of a loop without affecting the semantics of the program...
, and induction variable elimination can take advantage of information from both the caller and callee. - Loop skewing: By "skewing" the logical shape of an array, this loop optimization can (when combined with loop interchangeLoop interchangeIn compiler theory, loop interchange is the process of exchanging the order of two iteration variables.For example, in the code fragment: for i from 0 to 10 for j from 0 to 20 a[i,j] = i + jloop interchange would result in: for j from 0 to 20...
) eliminate loop-carried dependenciesLoop dependence analysisIn compiler theory, loop dependence analysis is the task of determining whether statements within a loop body form a dependence, with respect to array access and modification, induction, reduction and private variables, simplification of loop-independent code and management of conditional branches...
, allowing an inner loop to be parallelized.