[LLVMdev] Is there any way to modify basic block like adding junk code or ...
Chris Lattner
sabre at nondot.org
Mon Sep 20 15:17:33 PDT 2004
On Mon, 20 Sep 2004, Zhang Qiuyu wrote:
> Is there any way to modify code like adding junk code or mess up the
> order of a bunch of codes(in same basic block) which is no dependency? I
> saw some options like -dce -deadargelim for 'opt' , but what I want is
> to reverse to do it. I mean adding some dead code or junk code. Actually
> what I want is to implement a ploymorphic engine. Coud I do those by
> using llvm?
Sure, modifying and adding to the LLVM IR is easy. Please read the
programmers manual for more info:
http://llvm.org/docs/ProgrammersManual.html
For example, "Creating and inserting new Instructions" might be useful:
http://llvm.org/docs/ProgrammersManual.html#schanges_creating
-Chris
--
http://llvm.org/
http://nondot.org/sabre/
More information about the llvm-dev
mailing list