[LLVMdev] [GSoC 2014] Using LLVM as a code-generation backend for Valgrind

David Chisnall David.Chisnall at cl.cam.ac.uk
Tue Feb 25 00:52:17 PST 2014


On 25 Feb 2014, at 07:50, Reid Kleckner <rnk at google.com> wrote:

> I work on LLVM and used to work on Dr. Memory, a memory debugger similar to Valgrind's Memcheck.  I think using LLVM as a Valgrind backend is probably feasible, but I highly doubt that LLVM will be able to generate code quickly enough to make it usable.  It might be worthwhile as a second level JIT, but usually the major downside to DBI tools is the startup overhead, and LLVM code generation can only increase that.

It would also be interesting to cache the LLVM-generated code between runs, or even do it as an AOT pass.  A lot of the times I have problems where Valgrind would help, I end up needing multiple runs and each one takes several minutes of execution time (sometimes 5-10, because of the slowdown).  I've also found that for some applications, Valgrind's overhead makes it impossible to reproduce some timing issues and so the segfault just goes away if you run the code slower.

David





More information about the llvm-dev mailing list