[LLVMdev] Clang flag to either print/omit nop instruction in llvm backend

Ambuj Agrawal ambujbwt at gmail.com
Thu Mar 19 08:44:42 PDT 2015

I have created custom Clang flag -no_nop_optimise which can be passes with
clang on command line.

I am planning to implement someting like:
when -no_nop_optimise flag is passed on the command line do not emit a nop

i.e. inside SelLowering class
if ( !OPT_no_nop_optimise)
      BuildMI(*BB, MI, DL, TII->get(Mips::NOP));

Any clues on how can I pass the flag to the LLVM backend from clang?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150319/ad9ed9b8/attachment.html>

More information about the llvm-dev mailing list