How to get started with LLVM if I am to insert a NOP instruction randomly by adjusting the Code Generation Algorithm?

Hi, everyone.

I am so happy to join the LLVM email list to share some ideas and discuss technical problems. As listed in the topic, I was trying to insert a NOP instruction in a program by modifying the compiler.

I read through the documentation about the backend of LLVM. However, it is too general to implement this. Can someone give me some advice on this?

For you,the best way I think to start is to run llc to translate an ir file,which can be generated by clang with an existing C source,to a cppbackend output.Then you can know how instructions are built.

蜡笔小新 <>于2014年4月8日星期二写道:


you might also want to have a look at this thread on randomizing
compilation by inserting NOPs (and other techniques):