<div dir="ltr">Thanks Jonathan. I knew this document. But I didn't understand the "<span class="" style="color:rgb(167,29,93);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:13.4399995803833px;white-space:pre">unsigned</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Menlo,Courier,monospace;font-size:12px;line-height:13.4399995803833px;white-space:pre"> iType, Use *Ops</span>" fields. Could you please help how I can create a new instruction to do the example I was giving? Thanks for your time in advance.<div><br></div><div>Best,</div><div>Zhi</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Apr 16, 2015 at 5:48 PM, Jonathan Roelofs <span dir="ltr"><<a href="mailto:jonathan@codesourcery.com" target="_blank">jonathan@codesourcery.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">You're probably looking for this method: <a href="https://github.com/llvm-mirror/llvm/blob/master/include/llvm/IR/Instruction.h#L395" target="_blank">https://github.com/llvm-mirror/llvm/blob/master/include/llvm/IR/Instruction.h#L395</a><br>
<br>
Jon<span class=""><br>
<br>
On 4/16/15 6:38 PM, zhi chen wrote:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
I read the tutorial document, but I didn't understand the it and Ops<br>
fields of instruction class well. Can any one give me an example?<br>
<br>
Instruction *newInstr = new Instruction(Type *ty, unsigned it, Use *Ops,<br>
unsigned NumOps, Instruction *InsertBefore);<br>
<br></span>
For example, I have an *instruction *pInst *without no the type of<span class=""><br>
operation in advance. If I want to create a new instruction which is<br></span>
similar to the *pInst. *How can I do it?<span class=""><br>
<br>
Any help will be appreciated. Thanks.<br>
<br>
Best,<br>
Zhi<br>
<br>
<br></span>
_______________________________________________<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/mailman/listinfo/llvmdev</a><br>
<br><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
Jon Roelofs<br>
<a href="mailto:jonathan@codesourcery.com" target="_blank">jonathan@codesourcery.com</a><br>
CodeSourcery / Mentor Embedded<br>
</font></span></blockquote></div><br></div>