2
$\begingroup$

I need to define the data-flow analysis equations to determine the value dependencies of an statement.

For example:

a = 9 
b = a + 7
c = b * 2

the value of c depends on the value of a.

I'm sure this is a well known problem in data flow analysis, can any one point to the equations solving this? Static Single Assignment (SSA) form can be used.

$\endgroup$

1 Answer 1

2
$\begingroup$

Well, it seems that this can be reduced to the Reaching Definition problem, who's equations are:

$REACH_{in}(S) = \bigcup_{p \in pred(S)} REACH_{out}(p)$

$REACH_{out}(S) = GEN(S) \cup (REACH_{in}(S) - KILL(S))$

$GEN[d: y \rightarrow f(x_1, .., x_n)] = {d}$

$KILL[d: y \rightarrow f(x_1, .., x_n)] =DEFS(y) - {d}$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.