By meaning any 'potential' kills, do we have to think of every relation of every same name variable's definition?
By example,
2: y = 1;
3: y = sanitize(x);
4: y = 2;
method 1 : 2 does not kill 3, so kill(3,2) and kill(4,2), kill(4,3) is added to the set
method 2 : we just connect all defs of y, so kill(2,3) kill(3,2) kill(3,4) kill(4,3) kill(2,4) kill(4,2) is added to the set
It is sufficient to consider only when values are reassigned to variables of the same name in the execution flow.
In this case, method 1 is sufficient.
Name: 홍은기
By meaning any 'potential' kills, do we have to think of every relation of every same name variable's definition?
By example,
2: y = 1; 3: y = sanitize(x); 4: y = 2;
method 1 : 2 does not kill 3, so kill(3,2) and kill(4,2), kill(4,3) is added to the set method 2 : we just connect all defs of y, so kill(2,3) kill(3,2) kill(3,4) kill(4,3) kill(2,4) kill(4,2) is added to the set
Thank you in advance.