aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2017-12-12 02:16:31 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2017-12-12 02:16:31 +0000
commit8697bf9f46f36168ddba5752db582e673e3cbe8c (patch)
tree5ebc4974d8a1f07ace0cda3e302d94bfd57725a5 /gcc/toplev.c
parent96a95ac18c2fe573d9c5039be18cf7c6cb26f171 (diff)
downloadgcc-8697bf9f46f36168ddba5752db582e673e3cbe8c.zip
gcc-8697bf9f46f36168ddba5752db582e673e3cbe8c.tar.gz
gcc-8697bf9f46f36168ddba5752db582e673e3cbe8c.tar.bz2
[SFN] Introduce -gstatement-frontiers option, enable debug markers
Introduce a command line option to enable statement frontiers, enabled by default in optimized builds with DWARF2+ debug information. This patch depends on an earlier patch that completed the infrastructure for debug markers, and on another patch that turns -g into a negatable option prefix. for gcc/ChangeLog * common.opt (gstatement-frontiers): New, setting debug_nonbind_markers_p. * rtl.h (MAY_HAVE_DEBUG_MARKER_INSNS): Activate. * toplev.c (process_options): Autodetect value for debug statement frontiers option. * tree.h (MAY_HAVE_DEBUG_MARKER_STMTS): Activate. * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers): New. From-SVN: r255569
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 2f15496..b6e038d 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1536,6 +1536,10 @@ process_options (void)
warning_at (UNKNOWN_LOCATION, 0,
"var-tracking-assignments changes selective scheduling");
+ if (debug_nonbind_markers_p == AUTODETECT_VALUE)
+ debug_nonbind_markers_p = optimize && debug_info_level >= DINFO_LEVEL_NORMAL
+ && (write_symbols == DWARF2_DEBUG || write_symbols == VMS_AND_DWARF2_DEBUG);
+
if (flag_tree_cselim == AUTODETECT_VALUE)
{
if (HAVE_conditional_move)