Open sohah opened 6 years ago
Oof it's been a long time since I've been in this code. @juliandolby any thoughts here?
I assume you are talking about SSA for bytecode; note that SSA is constructed for the source front ends using the standard dominance frontier algorithm.
I believe what can happen is that the same local can be written in two different basic blocks, and then read in a successor block. This requires a 𝜙 node to merge the writes to the stack slot.
I am trying to understand how phis are constructed in WALA. It looks like they are generated in two places,
addPhiForLocal
andaddPhiForStackSlot
. These two are embedded in the larger context ofmeet
method. Now I really do not understand why do we needaddPhiForLocal
when in factaddPhiForStackSlot
will take care of all phis, it doesn't seem that we need the other one. Can anyone explain the reasoning behind that?Thanks