Manifest expression
This article needs additional citations for verification. (May 2007) |
A manifest expression is a programming language construct that a compiler can analyse to deduce which values it can take without having to execute the program. This information can enable compiler optimizations, in particular loop nest optimization, and parallelization through data dependency analysis. An expression is called manifest if it is computed only from outer loop counters and constants (a more formal definition is given below).
When all control flow for a loop or condition is regulated by manifest expressions, it is called a manifest loop resp. condition.
Most practical applications of manifest expressions also require the expression to be integral and affine (or stepwise affine) in its variables.
Definition
[edit]A manifest expression is a compile time computable function which depends only on
- compile-time constants,
- manifest variable references, and
- loop counters of loops surrounding the expression.
A manifest variable reference is itself defined as a variable reference with
- a single, unambiguous definition of its value,
- which is itself a manifest expression.
The single, unambiguous definition is particularly relevant in procedural languages, where pointer analysis and/or data flow analysis is required to find the expression that defines the variable value. If several defining expressions are possible (e.g. because the variable is assigned in a condition), the variable reference is not manifest.
See also
[edit]- Polytope model which requires manifest loops and conditions
- Loop nest optimization
References
[edit]Feautrier, Paul (February 1991). "Dataflow analysis of array and scalar references". International Journal of Parallel Programming. 20 (1): 23–53. CiteSeerX 10.1.1.31.1342. doi:10.1007/BF01407931. eISSN 1573-7640. ISSN 0885-7458. S2CID 5738544.