[LLVMdev] Source level debugging
Anna Zaks
ganna at cs.nyu.edu
Fri Jul 29 10:45:43 PDT 2005
Hi,
I am planning to use LLVM for a compiler validation
project that checks if the optimized version of the
code is the correct translation of the unoptimized
code. And I have a couple of questions.
I need two pieces of information from the compiler:
1) Some kind of mapping between the structure of the
unoptimized and optimized code. It seems, that can be
obtained via the llvm.dbg.stoppoint intrinsic
functions.
2) Mapping between the variables of the source code
(or unoptimized LLVM code) and the
variables/registers in the optimized code. My
understanding is that such mapping could be a part of
the debug information, but has not been implemented
yet. It seems that LLVM symbol table is not designed
to keep such information either.
Any suggestions on how to obtain this mapping?
As a side note, does anyone have examples of tail call
elimination performed with debugging information
enabled? It seems that it should be possible according
to the Source Level Debugging with LLVM:
"you get accurate stack traces despite tail call
elimination and inlining),". However, in my examples,
%llvm.dbg.stoppoint and %llvm.dbg.region.end get
inserted between the tail call and the return
statement, which stop tailcallelim unless I remove
them manually.
Thank you for your help,
Anna.
More information about the llvm-dev
mailing list