Method of Building A use-def (or ud) Chain
- Set definitions in statement s(0)
- For each i in, find live definitions that have use in statement s(i)
- Make a link among definitions and uses
- Set the statement s(i), as definition statement
- Kill previous definitions
With this algorithm, two things are accomplished:
- A directed acyclic graph (DAG) is created on the variable uses and definitions. The DAG specifies a data dependency among assignment statements, as well as a partial order (therefore parallelism among statements).
- When statement s(i) is reached, there is a list of live variable assignments. If only one assignment is live, for example, constant propagation might be used.
Read more about this topic: Use-define Chain
Famous quotes containing the words method, building and/or chain:
“... [a] girl one day flared out and told the principal the only mission opening before a girl in his school was to marry one of those candidates [for the ministry]. He said he didnt know but it was. And when at last that same girl announced her desire and intention to go to college it was received with about the same incredulity and dismay as if a brass button on one of those candidates coats had propounded a new method for squaring the circle or trisecting the arc.”
—Anna Julia Cooper (18591964)
“Travelling is the ruin of all happiness! Theres no looking at a building here after seeing Italy.”
—Fanny Burney (17521840)
“To avoid tripping on the chain of the past, you have to pick it up and wind it about you.”
—Mason Cooley (b. 1927)