[LLVMdev] Inserting dead code in IR byte code

teja tamboli tamboli.teja at gmail.com
Sun Nov 18 23:39:47 PST 2012


Hi all,

I am working on my Master's project in security and for this I need to do
following things :

1. I have a IR bytecode of the main program. I want to insert dead code
from other source files (e.g. cygwin files or the Linux files) in main
program's IR byte code.
2. In order to insert code, I can try following two ways :
   (i) I have observed that these IR bytecode files are just like a text
file and they have fixed format. Using file operations, we can modify IR
byte code of the first file by inserting the IR byte code from other files.

   (ii) Second approach is to use LLC Tool to generate c++ code of second
IR byte code. Then use generated c++ code and insert into the first IR byte
code. Write the optimizer pass on first IR byte code and add the
instructions from generated c++ code. Get the modified IR bytecode of the
first program.

Which approach is better and are there any other ways which I can use?

Thanks,
Teja
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121118/29c0935d/attachment.html>


More information about the llvm-dev mailing list