[llvm-dev] Change an instruction to another instruction
Pierre Gagelin via llvm-dev
llvm-dev at lists.llvm.org
Fri Sep 2 04:51:13 PDT 2016
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,%count4
Could 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,
> Bernard
Hope that helps,
Pierre
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160902/7b3b4876/attachment.html>
More information about the llvm-dev
mailing list