Purpose
Making the use-define or define-use chains is a step in liveness analysis, so that logical representations of all the variables can be identified and tracked through the code.
Consider the following snippet of code:
int x = 0; /* A */
x = x + y; /* B */
/* 1, some uses of x */
x = 35; /* C */
/* 2, some more uses of x */
Notice that x is assigned a value at three points (marked A, B, and C). However, at the point marked "1", the use-def chain for x should indicate that its current value must have come from line B (and its value at line B must have come from line A). Contrariwise, at the point marked "2", the use-def chain for x indicates that its current value must have come from line C. Since the value of the x in block 2 does not depend on any definitions in block 1 or earlier, x might as well be a different variable there; practically speaking, it is a different variable — call it x2.
int x = 0; /* A */
x = x + y; /* B */
/* 1, some uses of x */
int x2 = 35; /* C */
/* 2, some uses of x2 */
The process of splitting x into two separate variables is called live range splitting. See also static single assignment form.
Read more about this topic: Use-define Chain
Famous quotes containing the word purpose:
“No further evidence is needed to show that mental illness is not the name of a biological condition whose nature awaits to be elucidated, but is the name of a concept whose purpose is to obscure the obvious.”
—Thomas Szasz (b. 1920)
“A material resurrection seems strange and even absurd except for purposes of punishment, and all punishment which is to revenge rather than correct must be morally wrong, and when the World is at an end, what moral or warning purpose can eternal tortures answer?”
—George Gordon Noel Byron (17881824)
“I envy neither the heart nor the head of any legislator who has been born to an inheritance of privileges, who has behind him ages of education, dominion, civilization, and Christianity, if he stands opposed to the passage of a national education bill, whose purpose is to secure education to the children of those who were born under the shadow of institutions which made it a crime to read.”
—Frances Ellen Watkins Harper (18251911)