[llvm-dev] Rewriting LLVM IR intrinsic functions

David Chisnall via llvm-dev llvm-dev at lists.llvm.org
Mon Sep 14 02:32:43 PDT 2015


On 14 Sep 2015, at 09:36, Dipanjan Das via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> I have started working on automatic program repair where I need to work with a binary with source code unknown to us. May be using an in-house tool, I can lift off the binary to LLVM IR. I was planning to transform LLVM IR to equivalent high-level C code to try source code fixing approaches on the same.

If you convert from binary to LLVM IR, then from LLVM IR to source code, the source code that you get out will look nothing like the original, so there is no chance that your changes would be useful when applied to the original sources.  This sort of transformation would be better done in the LLVM IR (a representation designed for transformation), rather than in generated source code (a representation designed for human editing).

David



More information about the llvm-dev mailing list