Induction Variable Substitution
Induction variable substitution is a compiler transformation to recognize variables which can be expressed as functions of the indices of enclosing loops and replace them with induction variables with the expressions involving loop indices.
This transformation makes the relationship between the variables and loop indices explicit, which helps other compiler analysis, such as dependence analysis.
Example.
Input code:
int c, i; c = 10; for (i=0; i<10; i++) { c = c + 5; // c is incremented by 5 for each loop iteration }Output code
int c, i; c = 10; for (i=0; i<10; i++) { c = 10 + 5*i; // c is explicitly expressed as a function of loop index }Read more about this topic: Induction Variable
Famous quotes containing the words induction, variable and/or substitution:
“They relieve and recommend each other, and the sanity of society is a balance of a thousand insanities. She punishes abstractionists, and will only forgive an induction which is rare and casual.”
—Ralph Waldo Emerson (18031882)
“There is not so variable a thing in nature as a ladys head-dress.”
—Joseph Addison (16721719)
“Virtue is the adherence in action to the nature of things, and the nature of things makes it prevalent. It consists in a perpetual substitution of being for seeming, and with sublime propriety God is described as saying, I A.”
—Ralph Waldo Emerson (18031882)