<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif">I would like to use "new instruction()" or similar instruction that generate an NOP instruction and then insert it, randomly, between instructions of function basic blocks. But link doesn't provide a good example and limits to alloca instruction.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 9, 2015 at 1:05 PM, Evgeny Astigeevich <span dir="ltr"><<a href="mailto:evgeny.astigeevich@arm.com" target="_blank">evgeny.astigeevich@arm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Hi Zahra,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">What the problem do you have?<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Could you provide your code?<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Kind regards,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Evgeny Astigeevich<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> <a href="mailto:llvmdev-bounces@cs.uiuc.edu" target="_blank">llvmdev-bounces@cs.uiuc.edu</a> [mailto:<a href="mailto:llvmdev-bounces@cs.uiuc.edu" target="_blank">llvmdev-bounces@cs.uiuc.edu</a>] <b>On Behalf Of </b>Zahra Marj<br><b>Sent:</b> 09 July 2015 09:25<br><b>To:</b> LLVM Developers Mailing List<br><b>Subject:</b> [LLVMdev] insert nop instruction<u></u><u></u></span></p><div><div class="h5"><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif"">Hi.<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif"">I need to write a function pass that insert nop instruction in function. Examples of these instructions are: %nop = add i1 0, 0 or %nop = alloca i1, i1 0. This link couldn't help me: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_docs_ProgrammersManual.html-23creating-2Dand-2Dinserting-2Dnew-2Dinstructions&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=qXjJRaqkQWeOVtPcUv65c1zR2hwz2FyxkyPKUDcEsBM&s=CnMC85PvQDV1ouDHE2aQz5LytBiguUJ3JiOkMez73dg&e=" target="_blank">http://llvm.org/docs/ProgrammersManual.html#creating-and-inserting-new-instructions</a><u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif"">I need a clear example about inserting new instruction. Anyone can help me?<u></u><u></u></span></p></div><div><p class="MsoNormal"><span style="font-family:"Tahoma","sans-serif"">Thanks.<u></u><u></u></span></p></div></div></div></div></div></div></blockquote></div><br></div>