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

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 5 08:17:13 PST 2015


On Wednesday, November 4, 2015, Tamas Berghammer via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> tberghammer created this revision.
> tberghammer added a reviewer: echristo.
> tberghammer added a subscriber: cfe-commits.
>
> Add new compiler flag to enable the generation of dwarf accelerator tables
>
>
Is the additional information large enough to require a new flag?  They
wouldn't break split debug even though they don't work there yet, so if the
impact isn't large enough, might make sense to just enable them on -g.


> The dwarf accelerator tables already generated on darwin platforms. This
> CL ands a new flag to clang to make it possible to enable the generation of
> these tables on other platforms also.
>
> Note: Currently the accelerator table generation code isn't working when
> split dwarf is enabled for several reasons (accelerator tables aren't
> copied to dwo file, they contain relocation entries for the .debug_str.dwo
> sections). These issues should be addressed separately.
>
> http://reviews.llvm.org/D14354
>
> Files:
>   include/clang/Driver/Options.td
>   lib/Driver/Tools.cpp
>
> Index: lib/Driver/Tools.cpp
> ===================================================================
> --- lib/Driver/Tools.cpp
> +++ lib/Driver/Tools.cpp
> @@ -3876,6 +3876,14 @@
>      CmdArgs.push_back("-split-dwarf=Enable");
>    }
>
> +  // -gdwarf-accel-tables should turn on -g and enable the genereation of
> the
> +  // dwarf acceleration tables in the backend.
> +  if (Args.hasArg(options::OPT_gdwarf_accel_tables)) {
> +    DebugInfoKind = CodeGenOptions::LimitedDebugInfo;
> +    CmdArgs.push_back("-backend-option");
> +    CmdArgs.push_back("-dwarf-accel-tables=Enable");
> +  }
> +
>    // After we've dealt with all combinations of things that could
>    // make DebugInfoKind be other than None or DebugLineTablesOnly,
>    // figure out if we need to "upgrade" it to standalone debug info.
> Index: include/clang/Driver/Options.td
> ===================================================================
> --- include/clang/Driver/Options.td
> +++ include/clang/Driver/Options.td
> @@ -1161,6 +1161,7 @@
>  def gsplit_dwarf : Flag<["-"], "gsplit-dwarf">, Group<g_flags_Group>;
>  def ggnu_pubnames : Flag<["-"], "ggnu-pubnames">, Group<g_flags_Group>;
>  def gdwarf_aranges : Flag<["-"], "gdwarf-aranges">, Group<g_flags_Group>;
> +def gdwarf_accel_tables : Flag<["-"], "gdwarf-accel-tables">,
> Group<g_flags_Group>;
>  def gmodules : Flag <["-"], "gmodules">, Group<f_Group>,
>    HelpText<"Generate debug info with external references to clang modules"
>             " or precompiled headers">;
>
>
>

-- 
Saleem Abdulrasool
compnerd (at) compnerd (dot) org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151105/41c8449d/attachment.html>


More information about the cfe-commits mailing list