Bernard Nongpoh via llvm-dev
2016-Sep-02 10:36 UTC
[llvm-dev] Change an instruction to another instruction
Hello There, I want to change an instruction to another instruction as given below:- *original:* %count4 = getelementptr inbounds %struct.r32, %struct.r32* %cur.088, i64 0, i32 4, *to :* store i32 100,%count4 Thanks Regards, Bernard -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160902/70de0a01/attachment.html>
Pierre Gagelin via llvm-dev
2016-Sep-02 11:51 UTC
[llvm-dev] Change an instruction to another instruction
Hi Bernard, Le 02/09/2016 à 12:36, Bernard Nongpoh via llvm-dev a écrit :> Hello There, > I want to change an instruction to another instruction as given below:- > > *original:* %count4 = getelementptr inbounds %struct.r32, %struct.r32* > %cur.088, i64 0, i32 4, > > *to :* > store i32 100,%count4Could you please explain a little bit more the context? I don't get how you want to store upon a memory location that does not exist (if you remove the gep instruction). However to manage instructions you should take a look at Instruction and IRBuilder documentation: - http://llvm.org/docs/doxygen/html/classllvm_1_1IRBuilder.html (to create and insert any instruction) - http://llvm.org/docs/doxygen/html/classllvm_1_1Instruction.html (to erase or remove)> > > Thanks > Regards, > BernardHope that helps, Pierre -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160902/7b3b4876/attachment.html>