<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Thanks,<br>So, how do I check if a block dominates another one?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">

On 25 April 2013 11:59, Krzysztof Parzyszek <span dir="ltr"><<a href="mailto:kparzysz@codeaurora.org" target="_blank">kparzysz@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="HOEnZb"><div class="h5">On 4/25/2013 11:52 AM, Giacomo Tagliabue wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is there an easy way to know if, at a certain instruction, a certain<br>
value is usable or not? i.e., I am sure that if i use that value i don't<br>
to get the error "Instruction does not dominate all uses!"<br>
</blockquote>
<br></div></div>
Check if the block containing the definition dominates the block where you want to use the value.  If this is the same block, the definition has to appear before the use.  This follows directly from the error message, so I'm not sure if this answers your question.  Use the dominator tree analysis to check the dominance.<span class="HOEnZb"><font color="#888888"><br>


<br>
-Krzysztof<br>
<br>
-- <br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation<br>
______________________________<u></u>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvmdev</a><br>
</font></span></blockquote></div><br></div>