[LLVMdev] how to use "new instruction()"

zhi chen zchenhn at gmail.com
Thu Apr 16 17:38:35 PDT 2015


I read the tutorial document, but I didn't understand the it and Ops
fields of instruction class well. Can any one give me an example?

Instruction *newInstr = new Instruction(Type *ty, unsigned it, Use *Ops,
unsigned NumOps, Instruction *InsertBefore);

For example, I have an *instruction *pInst *without no the type of
operation in advance. If I want to create a new instruction which is
similar to the *pInst. *How can I do it?

Any help will be appreciated. Thanks.

Best,
Zhi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150416/fb57633b/attachment.html>


More information about the llvm-dev mailing list