<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 1, 2015 at 1:27 AM, Canumalla Anirudh <span dir="ltr"><<a href="mailto:anirudh.c.93@gmail.com" target="_blank">anirudh.c.93@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>I have two questions that I need answers to . Hope somebody can help me</div><div><br></div>1) The LLVM IR has three forms of representation - In memory, bitcode representation and the human readable form. I would like to know the differences between the two representations if any.<div><br></div><div>2) I will explain my situation and then get to the second question:</div><div> </div><div>I needed the operands of instructions represented in strings and hence I used</div><div> "curr_Ins->getOperand(0)->getname()", where curr_Ins was a variable of type Instruction*</div><div> If there is an instruction that has a direct integer as an operand, I was unable to do this. I had to cast that operand to a ConstInt and then obtain its value (by the getValue() function) and then convert it to a string. </div><div>If getOperand always returned Value* then why is it that if there was a Numerical operand I was unable to invoke the getName() function with it. Is it because getOperand(1) returned an object of different type when there was a numerical operand. If so, what are the possible types that can come as operands to instructions.<br></div></div></blockquote><div><br>Lots of things are values, not all of them have names. Here's he full taxonomy of Values: <a href="http://llvm.org/docs/doxygen/html/classllvm_1_1Value.html">http://llvm.org/docs/doxygen/html/classllvm_1_1Value.html</a><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div></div><div><br></div><div>Thanks in advance.</div><span class=""><font color="#888888"><div><br></div><div>Anirudh</div></font></span></div>
<br>_______________________________________________<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></blockquote></div><br></div></div>