























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
























Y
Y
r1 = r2 + r3 kills previous definitions of r Y
Forward dataflow analysis as propagation occurs from defs downwards Y
GEN = set of definitions generated in the BB (ops not vars !!) » KILL = set of definitions killed in the BB » IN = set of definitions reaching the BB entry » OUT = set of definitions reaching the BB exit
y change = false y for each BB X apply meet function X apply transfer functions X if any changes Æ change = true
for each basic block in the procedure, X, do up_use_GEN(X) = 0 up_use_KILL(X) = 0 for each operation in reverse sequential order in X, op, do for each destination operand of op, dest, do^ up_use_GEN(X) -= dest^ up_use_KILL(X) += dest endfor for each source operand of op, src, do^ up_use_GEN(X) += src^ up_use_KILL(X) -= src endfor endfor endfor