<div style="white-space:pre-wrap">Hi Erdem,<br><br>I would write a MachineFunction pass. You can check each load instruction to see if it is a private memory access and insert what you want by using BuildMI(...) function.<br><br>Volkan</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Sep 15, 2015 at 4:16 AM Erdem Derebaşoğlu <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div><div dir="ltr">I would like to convert a C file that uses OpenMP library to X86 code with a condition: I want to insert a NOP before each instruction that does a private memory access.<div>I have written an optimization pass that inserts an inline assembly call (NOP) but it is applied at IR level, and I cannot determine where to insert it. How can I use LLVM to add NOPs accordingly?</div><div><br></div><div>Thanks.</div>                                     </div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>