[cfe-dev] 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
instruction.

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?

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


More information about the cfe-dev mailing list