diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2018-02-13 16:18:37 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2018-02-13 09:18:37 -0700 |
commit | 924c9e3efbc3a0a93dd539ef2997df3f8473bca7 (patch) | |
tree | d12fcabb641c8484c55ff30a041f1c9021e834bc /gcc/toplev.c | |
parent | 9ef86762aaf64ca72844962c0dfaa02370b8e3ff (diff) | |
download | gcc-924c9e3efbc3a0a93dd539ef2997df3f8473bca7.zip gcc-924c9e3efbc3a0a93dd539ef2997df3f8473bca7.tar.gz gcc-924c9e3efbc3a0a93dd539ef2997df3f8473bca7.tar.bz2 |
common.opt (gas-loc-support, [...]): New.
* common.opt (gas-loc-support, gas-locview-support): New.
(ginline-points, ginternal-reset-location-views): New.
* doc/invoke.texi: Document them. Use @itemx where intended.
(gvariable-location-views): Adjust.
* target.def (reset_location_view): New.
* doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
(TARGET_RESET_LOCATION_VIEW): New.
* doc/tm.texi: Rebuilt.
* dwarf2out.c (dwarf2out_default_as_loc_support): New.
(dwarf2out_default_as_locview_support): New.
(output_asm_line_debug_info): Use option variables.
(dwarf2out_maybe_output_loclist_view_pair): Likewise.
(output_loc_list): Likewise.
(add_high_low_attributes): Check option variables.
Don't output entry view attribute in strict mode.
(gen_inlined_subroutine_die): Check option variables.
(dwarf2out_inline_entry): Likewise.
(init_sections_and_labels): Likewise.
(dwarf2out_early_finish): Likewise.
(maybe_reset_location_view): New, from...
(dwarf2out_var_location): ... here. Call it.
* debug.h (dwarf2out_default_as_loc_support): Declare.
(dwarf2out_default_as_locview_support): Declare.
* hooks.c (hook_int_rtx_insn_0): New.
* hooks.h (hook_int_rtx_insn_0): Declare.
* toplev.c (process_options): Take -gas-loc-support and
-gas-locview-support from dwarf2out. Enable
-gvariable-location-views by default only with locview
assembler support. Enable -ginternal-reset-location-views by
default only if the target defines the corresponding hook.
Enable -ginline-points by default if location views are
enabled; force it disabled if statement frontiers are
disabled.
* tree-inline.c (expand_call_inline): Check option variables.
* tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
From-SVN: r257631
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 45 |
1 files changed, 40 insertions, 5 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 23db063..b066bcc 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1558,13 +1558,23 @@ process_options (void) || write_symbols == VMS_AND_DWARF2_DEBUG) && !(flag_selective_scheduling || flag_selective_scheduling2)); + if (dwarf2out_as_loc_support == AUTODETECT_VALUE) + dwarf2out_as_loc_support + = dwarf2out_default_as_loc_support (); + if (dwarf2out_as_locview_support == AUTODETECT_VALUE) + dwarf2out_as_locview_support + = dwarf2out_default_as_locview_support (); + if (debug_variable_location_views == AUTODETECT_VALUE) { - debug_variable_location_views = flag_var_tracking - && debug_info_level >= DINFO_LEVEL_NORMAL - && (write_symbols == DWARF2_DEBUG - || write_symbols == VMS_AND_DWARF2_DEBUG) - && !dwarf_strict; + debug_variable_location_views + = (flag_var_tracking + && debug_info_level >= DINFO_LEVEL_NORMAL + && (write_symbols == DWARF2_DEBUG + || write_symbols == VMS_AND_DWARF2_DEBUG) + && !dwarf_strict + && dwarf2out_as_loc_support + && dwarf2out_as_locview_support); } else if (debug_variable_location_views == -1 && dwarf_version != 5) { @@ -1574,6 +1584,31 @@ process_options (void) debug_variable_location_views = 1; } + if (debug_internal_reset_location_views == 2) + { + debug_internal_reset_location_views + = (debug_variable_location_views + && targetm.reset_location_view); + } + else if (debug_internal_reset_location_views + && !debug_variable_location_views) + { + warning_at (UNKNOWN_LOCATION, 0, + "-ginternal-reset-location-views is forced disabled " + "without -gvariable-location-views"); + debug_internal_reset_location_views = 0; + } + + if (debug_inline_points == AUTODETECT_VALUE) + debug_inline_points = debug_variable_location_views; + else if (debug_inline_points && !debug_nonbind_markers_p) + { + warning_at (UNKNOWN_LOCATION, 0, + "-ginline-points is forced disabled without " + "-gstatement-frontiers"); + debug_inline_points = 0; + } + if (flag_tree_cselim == AUTODETECT_VALUE) { if (HAVE_conditional_move) |