[llvm-dev] How to add NOP?

Volkan Keles via llvm-dev llvm-dev at lists.llvm.org
Tue Sep 15 07:38:16 PDT 2015


Hi Erdem,

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.

Volkan

On Tue, Sep 15, 2015 at 4:16 AM Erdem Derebaşoğlu <llvm-dev at lists.llvm.org>
wrote:

> 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.
> 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?
>
> Thanks.
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150915/f258df13/attachment.html>


More information about the llvm-dev mailing list