You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know that the IR is already optimised and does not contain the set of a value, so the then branch and the else branch are empty. Is it possible to know that v9 is from the then branch and v3 is from the else branch?
The text was updated successfully, but these errors were encountered:
Hi @felixmaechtle, in a phi instruction, the uses are in the same order as the predecessor basic blocks in the control-flow graph. So, you can figure out which predecessor block sends v9 and which sends v3, by iterating predecessors using cfg.getPredNodes() and going in order.
Now, you want to know for each of these blocks, whether they correspond to the "then" or "else" case of the conditional branch. The cfg Util class may be of help here:
It can help you find the taken and not-taken successors of a block. I hope this helps; please let me know if this solves your issue or if you have more questions.
Hello,
given the following piece of code:
This results in the following IR within WALA (excerpt from
ir.toString()
):I know that the IR is already optimised and does not contain the set of a value, so the then branch and the else branch are empty. Is it possible to know that v9 is from the then branch and v3 is from the else branch?
The text was updated successfully, but these errors were encountered: