Giacomo Tagliabue
2013-Apr-25 16:52 UTC
[LLVMdev] How to know if an instruction is "usable"
Is there an easy way to know if, at a certain instruction, a certain value is usable or not? i.e., I am sure that if i use that value i don't to get the error "Instruction does not dominate all uses!" Thanks, GT -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130425/477fc259/attachment.html>
Krzysztof Parzyszek
2013-Apr-25 16:59 UTC
[LLVMdev] How to know if an instruction is "usable"
On 4/25/2013 11:52 AM, Giacomo Tagliabue wrote:> Is there an easy way to know if, at a certain instruction, a certain > value is usable or not? i.e., I am sure that if i use that value i don't > to get the error "Instruction does not dominate all uses!"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. -Krzysztof -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
Giacomo Tagliabue
2013-Apr-25 17:06 UTC
[LLVMdev] How to know if an instruction is "usable"
Thanks, So, how do I check if a block dominates another one? On 25 April 2013 11:59, Krzysztof Parzyszek <kparzysz at codeaurora.org> wrote:> On 4/25/2013 11:52 AM, Giacomo Tagliabue wrote: > >> Is there an easy way to know if, at a certain instruction, a certain >> value is usable or not? i.e., I am sure that if i use that value i don't >> to get the error "Instruction does not dominate all uses!" >> > > 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. > > -Krzysztof > > -- > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted > by The Linux Foundation > ______________________________**_________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/**mailman/listinfo/llvmdev<http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130425/7801552d/attachment.html>