Make only .debug imply .tr, not .decldebug.

Estimated hours taken: 1
Branches: main

compiler/handle_options.m:
scripts/final_grade_options.sh-subr:
	Make only .debug imply .tr, not .decldebug. Declarative debugging
	requires retries, which work in trailing grades only if the entity
	that does the trailing is prepared for them.

configure.in:
	Make the decldebug grade installed when enabled be the one without .tr.
This commit is contained in:
Zoltan Somogyi
2005-05-18 05:45:00 +00:00
parent ff87666c9c
commit 8359771713
3 changed files with 19 additions and 11 deletions

View File

@@ -841,17 +841,25 @@ postprocess_options_2(OptionTable0, Target, GC_Method, TagsMethod0,
option_implies(exec_trace, stack_trace, bool(yes)),
option_implies(profile_deep, stack_trace, bool(yes)),
% The `.debug' grade implies --use-trail, except with
% --use-minimal-model, which is not compatible with --use-trail.
%
% The reason for this is to avoid unnecessary proliferation in
% The `.debug' grade implies --use-trail in most cases. The reason
% for the implication is to avoid unnecessary proliferation in
% the number of different grades. If you're using --debug,
% you've already taken a major performance hit, so you should
% be able to afford the minor performance hit caused by
% --use-trail.
% be able to afford the minor performance hit caused by --use-trail.
%
% There are two exceptions. First, --use-minimal-model doesn't work
% with trails. Second, the only difference between debug and decldebug
% is the latter's support for declarative debugging, which inherently
% requires retries in the debugger. These retries don't reset the
% trail unless the code that creates the trail entries has prepared for
% retries, which usually isn't the case. In any case, the space
% overhead of decldebug grades is high enough that we don't want the
% space overhead of trailing (mostly for extra code) as well unless the
% user has explicitly requested it.
globals__io_lookup_bool_option(exec_trace, ExecTrace),
( { ExecTrace = yes, UseMinimalModel = no } ->
globals__io_lookup_bool_option(decl_debug, DeclDebug),
( { ExecTrace = yes, DeclDebug = no, UseMinimalModel = no } ->
globals__io_set_option(use_trail, bool(yes))
;
[]

View File

@@ -2773,7 +2773,7 @@ fi
if test "$enable_debug_grades" = yes; then
LIBGRADES="$LIBGRADES $BEST_DEBUG_BASE_GRADE.gc.tr.debug"
if test "$enable_decl_debug_grades" = yes; then
LIBGRADES="$LIBGRADES $BEST_DEBUG_BASE_GRADE.gc.tr.decldebug"
LIBGRADES="$LIBGRADES $BEST_DEBUG_BASE_GRADE.gc.decldebug"
fi
fi

View File

@@ -1,5 +1,5 @@
#---------------------------------------------------------------------------#
# Copyright (C) 1998-2002, 2004 The University of Melbourne.
# Copyright (C) 1998-2002, 2004-2005 The University of Melbourne.
# This file may only be copied under the terms of the GNU General
# Public License - see the file COPYING in the Mercury distribution.
#---------------------------------------------------------------------------#
@@ -41,10 +41,10 @@ case $use_trail,$use_minimal_model in true,true)
esac
#
# .debug grade implies --use-trail in the absence of .*mm*
# .debug grade (but not .decldebug) implies --use-trail in the absence of .*mm*
# (see comment in compiler/handle_options.m for rationale)
#
case $debug,$use_minimal_model in true,false)
case $debug,$decl_debug,$use_minimal_model in true,false,false)
use_trail=true ;;
esac