Zhang Qiuyu
2004-Sep-20 22:10 UTC
[LLVMdev] Is there any way to modify basic block like adding junk code or ...
Hi , 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? Thanks. Qiuyu -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040920/2364050d/attachment.html>
Chris Lattner
2004-Sep-20 22:17 UTC
[LLVMdev] Is there any way to modify basic block like adding junk code or ...
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/
Apparently Analagous Threads
- [LLVMdev] Re:Re:Is there any way to modify basic block like adding junk code
- [LLVMdev] question about compile path
- [LLVMdev] Re: How could I get memory address for each assemble code?
- [LLVMdev] opt -globaldce -deadargelim yields different result then when run separately
- [LLVMdev] How could I get memory address for each basic block?