[LLVMdev] Using LLVM for decompiling.

陳韋任 chenwj at iis.sinica.edu.tw
Mon May 7 08:38:32 PDT 2012


> > I am writing a decompiler. I was wondering if some of LLVM could be
> > used for a decompiler.
> > There are several stages in the decompiler process.
> > 1) Take binary and create a higher level representation of it. Like RTL.
> > 2) The output is then broken into blocks or nodes, each block ends in
> > a CALL, JMP, RET, or 2-way or multiway conditional JMP.
> 
> I'm not sure that there's anything that will help you with this step for 
> LLVM.  The closest I can think of is Qemu, and I think that uses dynamic 
> binary translation (i.e., you have to run the binary program).

  You can tranlate TCG IR into LLVM IR instead of writing your own tranlation
function, if you want to leverage QEMU for this part.

Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj




More information about the llvm-dev mailing list