mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-09 10:52:24 +00:00
Remove the implication from .debug to .tr.
Estimated hours taken: 1 Branches: main compiler/handle_options.m: scripts/final_grade_options.sh-subr.m: Remove the implication from .debug to .tr. This implication is no longer appropriate, since we now have both .tr and .trseg versions of trailing, and .trseg is the more useful one. However, since .tr is still used, replacing the implication with one from .debug to .trseg is not appropriate either. Removing the implication yields an executable size reduction of 6.8%, and speedup of 10%.
This commit is contained in:
@@ -1250,34 +1250,6 @@ postprocess_options_2(OptionTable0, Target, GC_Method, TagsMethod0,
|
|||||||
option_implies(profile_deep, should_pretest_equality, bool(yes),
|
option_implies(profile_deep, should_pretest_equality, bool(yes),
|
||||||
!Globals),
|
!Globals),
|
||||||
|
|
||||||
% 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.
|
|
||||||
%
|
|
||||||
% 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.lookup_bool_option(!.Globals, exec_trace, ExecTrace),
|
|
||||||
globals.lookup_bool_option(!.Globals, decl_debug, DeclDebug),
|
|
||||||
(
|
|
||||||
ExecTrace = yes,
|
|
||||||
DeclDebug = no,
|
|
||||||
UseMinimalModel = no
|
|
||||||
->
|
|
||||||
globals.set_option(use_trail, bool(yes), !Globals)
|
|
||||||
;
|
|
||||||
true
|
|
||||||
),
|
|
||||||
|
|
||||||
% In debugging grades, we want to generate executables in which
|
% In debugging grades, we want to generate executables in which
|
||||||
% one can do retries across I/O safely.
|
% one can do retries across I/O safely.
|
||||||
option_implies(exec_trace, trace_table_io_all, bool(yes), !Globals),
|
option_implies(exec_trace, trace_table_io_all, bool(yes), !Globals),
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#---------------------------------------------------------------------------#
|
#---------------------------------------------------------------------------#
|
||||||
# Copyright (C) 1998-2002, 2004-2007 The University of Melbourne.
|
# Copyright (C) 1998-2002, 2004-2007, 2009 The University of Melbourne.
|
||||||
# This file may only be copied under the terms of the GNU General
|
# This file may only be copied under the terms of the GNU General
|
||||||
# Public License - see the file COPYING in the Mercury distribution.
|
# Public License - see the file COPYING in the Mercury distribution.
|
||||||
#---------------------------------------------------------------------------#
|
#---------------------------------------------------------------------------#
|
||||||
@@ -49,14 +49,6 @@ case $extend_stacks,$stack_segments in true,true)
|
|||||||
exit 1 ;;
|
exit 1 ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
#
|
|
||||||
# .debug grade (but not .decldebug) implies --use-trail in the absence of .*mm*
|
|
||||||
# (see comment in compiler/handle_options.m for rationale)
|
|
||||||
#
|
|
||||||
case $debug,$decl_debug,$use_minimal_model in true,false,false)
|
|
||||||
use_trail=true ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# --decl-debug implies --debug
|
# --decl-debug implies --debug
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user