<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi Bernard,<br>
</p>
<br>
<div class="moz-cite-prefix">Le 02/09/2016 à 12:36, Bernard Nongpoh
via llvm-dev a écrit :<br>
</div>
<blockquote
cite="mid:CAH=eYDDo92SD-17rQ9rk3BQhGMxSZBTn=fM4=n+HrCy8+LibGA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>Hello There,<br>
</div>
<div>I want to change an instruction to another instruction as
given below:-<br>
<br>
<b>original:</b> %count4 = getelementptr inbounds %struct.r32,
%struct.r32* %cur.088, i64 0, i32 4, <br>
<br>
</div>
<div><b>to :</b><br>
</div>
<div>store i32 100,%count4<br>
</div>
</div>
</blockquote>
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).<br>
<br>
However to manage instructions you should take a look at Instruction
and IRBuilder documentation:<br>
- <a class="moz-txt-link-freetext" href="http://llvm.org/docs/doxygen/html/classllvm_1_1IRBuilder.html">http://llvm.org/docs/doxygen/html/classllvm_1_1IRBuilder.html</a>
(to create and insert any instruction)<br>
- <a class="moz-txt-link-freetext" href="http://llvm.org/docs/doxygen/html/classllvm_1_1Instruction.html">http://llvm.org/docs/doxygen/html/classllvm_1_1Instruction.html</a>
(to erase or remove)<br>
<blockquote
cite="mid:CAH=eYDDo92SD-17rQ9rk3BQhGMxSZBTn=fM4=n+HrCy8+LibGA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
<br>
</div>
<div>Thanks <br>
</div>
<div>Regards,<br>
</div>
<div>Bernard<br>
</div>
</div>
</blockquote>
Hope that helps,<br>
Pierre<br>
</body>
</html>