Thanks Michael.<div>I wish to get Type of %1 i.e. result of instruction. Let me try out your suggestion. But It is still not clear to me how will dyn_cast will help here. I already have pointer to this particular instruction. <br>
<div><br><br><div class="gmail_quote">On Mon, Aug 1, 2011 at 5:34 PM, Michael Ilseman <span dir="ltr"><<a href="mailto:michael@lunarg.com">michael@lunarg.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
In LLVM, %1 is the instruction itself. This is because LLVM IR is in<br>
SSA, so the "=" really means equality. If you look at a use of %1,<br>
e.g. as an operand to another instruction, you'll see that it's the<br>
instruction itself that is there (i.e. you can dyn_cast<Instruction><br>
it).<br>
<div><div></div><div class="h5"><br>
On Mon, Aug 1, 2011 at 5:27 PM, Manish Gupta <<a href="mailto:manishg@cs.ucsd.edu">manishg@cs.ucsd.edu</a>> wrote:<br>
> What member function to use if I wish to operate on results of an<br>
> instruction.<br>
> eg.<br>
> Instruction %1 = getelementptr inbounds [10 x i32]* %a, i32 0, i32 %0<br>
> I->getOperand will give me the operands.<br>
> How should I get hold of %1?<br>
> Thanks,<br>
> Manish<br>
</div></div>> _______________________________________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:LLVMdev@cs.uiuc.edu">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/mailman/listinfo/llvmdev</a><br>
><br>
><br>
</blockquote></div><br></div></div>