From 1e23fb0875facd9440b6948bbe293809ebfba156 Mon Sep 17 00:00:00 2001 From: keithw Date: Tue, 11 May 1999 16:42:32 +0000 Subject: [PATCH] [project @ 1999-05-11 16:42:29 by keithw] (this is number 5b of 9 commits to be applied together) The major purpose of this commit is to introduce usage information and usage analysis into the compiler, per the paper _Once Upon a Polymorphic Type_ (Keith Wansbrough and Simon Peyton Jones, POPL'99, and Glasgow TR-1998-19). An analysis is provided that annotates a Core program with optimal usage annotations. This analysis is performed by -fusagesp (=CoreDoUSPInf), and requires -fusagesp-on (=opt_UsageSPOn). This latter performs an analysis in tidyCorePgm, immediately before CoreToStg is done. The driver flag -fusagesp currently provides hsc with -fusagesp-on, and if -O is on does a single -fusagesp early on in the Core-to-Core sequence. Please change this as desired. *NB*: For now, -fusagesp with -O requires -fno-specialise. Sorry. The flags -ddump-usagesp (=opt_D_dump_usagesp) and -dusagesp-lint (=opt_DoUSPLinting) (also -dnousagesp-lint to the driver) have been added and are documented in the User Guide. --- ghc/docs/users_guide/debugging.vsgml | 28 +++++++ ghc/docs/users_guide/profiling.vsgml | 109 +++++++++++++++++++++++++++- ghc/docs/users_guide/runtime_control.vsgml | 10 ++- ghc/driver/ghc.lprl | 18 ++++- 4 files changed, 158 insertions(+), 7 deletions(-) diff --git a/ghc/docs/users_guide/debugging.vsgml b/ghc/docs/users_guide/debugging.vsgml index cdf951c..78842c7 100644 --- a/ghc/docs/users_guide/debugging.vsgml +++ b/ghc/docs/users_guide/debugging.vsgml @@ -109,6 +109,7 @@ need a short form...). Some of the most useful ones are: @-ddump-ds@ | desugarer output @@ @-ddump-simpl@ | simplifer output (Core-to-Core passes) @@ @-ddump-stranal@ | strictness analyser output @@ +@-ddump-usagesp@ | UsageSP inference pre-inf and output @@ @-ddump-occur-anal@ | `occurrence analysis' output @@ @-ddump-spec@ | dump specialisation info @@ @-ddump-stg@ | output of STG-to-STG passes @@ @@ -124,6 +125,7 @@ need a short form...). Some of the most useful ones are: -ddump-deriv option% -ddump-ds option% -ddump-simpl option% +-ddump-usagesp option% -ddump-stranal option% -ddump-occur-anal option% -ddump-spec option% @@ -191,6 +193,32 @@ Have the renamer report what imports does not contribute. %-ddump-asm-globals-info %---------------------------------------------------------------------- +Checking for consistency +