From 478cf3d8d443f76a99d82c91dabc986c398ed875 Mon Sep 17 00:00:00 2001 From: Zoltan Somogyi Date: Thu, 4 Jun 2009 07:48:21 +0000 Subject: [PATCH] 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%. --- compiler/handle_options.m | 28 ---------------------------- scripts/final_grade_options.sh-subr | 10 +--------- 2 files changed, 1 insertion(+), 37 deletions(-) diff --git a/compiler/handle_options.m b/compiler/handle_options.m index 22c9040b1..f5c1b16ed 100644 --- a/compiler/handle_options.m +++ b/compiler/handle_options.m @@ -1250,34 +1250,6 @@ postprocess_options_2(OptionTable0, Target, GC_Method, TagsMethod0, option_implies(profile_deep, should_pretest_equality, bool(yes), !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 % one can do retries across I/O safely. option_implies(exec_trace, trace_table_io_all, bool(yes), !Globals), diff --git a/scripts/final_grade_options.sh-subr b/scripts/final_grade_options.sh-subr index ea240a1a4..30a1cb89d 100644 --- a/scripts/final_grade_options.sh-subr +++ b/scripts/final_grade_options.sh-subr @@ -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 # Public License - see the file COPYING in the Mercury distribution. #---------------------------------------------------------------------------# @@ -49,14 +49,6 @@ case $extend_stacks,$stack_segments in true,true) exit 1 ;; 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 #