[PATCH] D14354: Add new compiler flag to enable the generation of dwarf accelerator tables

Paul Robinson via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 9 14:48:13 PST 2015


probinson added a comment.

In http://reviews.llvm.org/D14354#285546, @dblaikie wrote:

> Or Tamas can write the tuning patch - it seems like it'd be relatively
>  straightforward. Perhaps you can give an idea of what you think it'd look
>  like, Paul (what the command line syntax would be, etc)


My thought was:  There is already a -ggdb option, which today means the same as -g.  But, it could mean what GCC documents it to mean: "Produce debugging information for use by GDB... including GDB extensions if at all possible."  That is, tune the DWARF for GDB.
We could then add the corresponding options -glldb (tune for LLDB) and -gsce (tune for SCE debugger).
All of these would imply -g of course, and pass along the requested tuning to LLVM.  Clang already maintains a debug-info "level" in the CodeGenOpts, and the tuning seems like it would fit right alongside.  There are doubtless places in Clang where we would end up taking advantage of this.
With the tuning passed down from Clang to LLVM, there is already a place in LLVM to turn on the accel tables for LLDB, and so for the use case described in this patch, exposing tuning from the driver solves the problem.

I did have a patch at one point, but in the meantime somebody has overhauled -g* processing and there is still some question how to pass down the tuning in a way that is robust for LTO.

I'm fine with somebody else doing the patch if it's useful to them and desirable in a shorter timescale than I can provide right now.


http://reviews.llvm.org/D14354





More information about the cfe-commits mailing list