constant folding

(redirected from Constant propagation)

constant folding

(compiler)
A compiler optimisation technique where constant subexpressions are evaluated at compile time. This is usually only applied to built-in numerical and boolean operators whereas partial evaluation is more general in that expressions involving user-defined functions may also be evaluated at compile time.
This article is provided by FOLDOC - Free Online Dictionary of Computing (foldoc.org)
References in periodicals archive ?
Consequently, after customization and constant propagation, this order allows to have the smallest area among all combinations.
Then, netlists and netlist functions are regenerated regarding new pin orders which allow more constant propagation optimizations.
The more mASIC has constants, the more constant propagation induces logic pruning and optimizes the area.
Knowing the distribution of the electromagnetic field in the microwave structures makes possible the understanding of the waves' constant propagation, its dependence on frequency, the propagation speed, for the phase and constant attenuation.
It can be tricky and needs constant propagation to keep it going but the scent is well worth the effort.
Thus, if we find, as a result of interprocedural constant propagation, that a conditional branch within a function will always be taken, and there is no other control flow path to the code in the branch that is not taken, then the latter code becomes unreachable and can be eliminated.
(3) We carry out interprocedural constant propagation on the resulting control flow graph, as described in Section 2.2.2.
General Terms: Algorithms, Performance, Experimentation Additional Key Words and Phrases: Copy constant propagation, data flow analysis, def-use chains, demand-driven algorithms, distributive data flow frameworks, interprocedural data flow analysis, program optimizations
The class of distributive problems includes, among others, the four classical bit vector problems (i.e., reaching-definitions, available expressions, live variables, and very busy expressions), restricted versions of constant propagation (e.g., copy constant propagation), and interprocedural problems such as procedure side-effect analysis [Cooper and Kennedy 1988].
We have specified over 20 transformations using Gospel, including specifications for invariant code motion, loop fusion, induction variable elimination, constant propagation, copy propagation, and loop unrolling.
Figure 2 presents a Gospel specification of a Constant Propagation transformation (CTP) (see Section 3.2 for details).
This is guaranteed by the constant propagation velocity of light in the ether and the Lorentz transformation (LT), as shown by Maxwell's luminiferous ether theory and confirmed by two-way speed of light measurements in vacuo.

Full browser ?