<div dir="ltr">Yes, seems that this is the most convenient one. Thank you!<br></div><div class="gmail_extra"><br><div class="gmail_quote">2017-08-14 20:47 GMT+02:00 Friedman, Eli <span dir="ltr"><<a href="mailto:efriedma@codeaurora.org" target="_blank">efriedma@codeaurora.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 8/14/2017 3:58 AM, Anastasiya Ruzhanskaya via llvm-dev wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
Is it a convenient way except of somehow iterating from one block to another to find from which block I have initial incoming value and from which I have a changing incoming value (this is only for phi nodes with two incoming blocks)? Dominator tree requires to know one block and one block edge...this is not what I want. Is it valid to take two first instructions from two incoming blocks and see what dominates what?<br>
</blockquote>
<br></span>
You can use Loop::contains() to figure out whether a basic block is inside a loop.  I think that's what you're looking for?<span class="HOEnZb"><font color="#888888"><br>
<br>
-Eli<br>
<br>
-- <br>
Employee of Qualcomm Innovation Center, Inc.<br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project<br>
<br>
</font></span></blockquote></div><br></div>