[m-rev.] diff: avoid spurious exception analysis requests

Peter Wang novalazy at gmail.com
Thu Aug 21 17:31:08 AEST 2008


Branches: main

compiler/exception_analysis.m:
	Don't look up exception analysis results from the intermodule analysis
	registry if exception analysis isn't enabled.  This avoids recording
	requests for further exception analysis when it isn't actually enabled.

diff --git a/compiler/exception_analysis.m b/compiler/exception_analysis.m
index 6ccc379..0f0c46d 100644
--- a/compiler/exception_analysis.m
+++ b/compiler/exception_analysis.m
@@ -1254,13 +1254,16 @@ lookup_exception_analysis_result(PPId, ExceptionStatus, !ModuleInfo) :-
     module_info_get_globals(!.ModuleInfo, Globals),
     globals.lookup_bool_option(Globals, intermodule_analysis,
         IntermodAnalysis),
+    globals.lookup_bool_option(Globals, analyse_exceptions,
+        ExceptionAnalysis),
     %
     % If we the procedure we are calling is imported and we are using
     % intermodule-analysis then we need to look up the exception status in the
     % analysis registry; otherwise we look it up in the the exception_info
     % table.
     %
-    UseAnalysisRegistry = IsImported `bool.and` IntermodAnalysis,
+    UseAnalysisRegistry = IsImported `bool.and` IntermodAnalysis
+        `bool.and` ExceptionAnalysis,
     (
         % If the procedure is not imported then it's exception_status
         % will be in the exception_info table.


--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list