diff --git a/ghc/docs/users_guide/using.vsgml b/ghc/docs/users_guide/using.vsgml index 4fd1330372c0002a66ecd3cd37309383afdc0456..5b93782c66e2cd2b4f3bdea551934c4c6ec9e5c5 100644 --- a/ghc/docs/users_guide/using.vsgml +++ b/ghc/docs/users_guide/using.vsgml @@ -940,14 +940,22 @@ example, you can say @-O2 -fno-strictness@, which will then drop out any running of the strictness analyser. The options you are most likely to want to turn off are: +<itemize> +<item> @-fno-strictness@<nidx>-fno-strictness option</nidx> (strictness analyser [because it is sometimes slow]), +<item> @-fno-specialise@<nidx>-fno-specialise option</nidx> (automatic specialisation of overloaded functions [because it makes your code bigger]) [US spelling also accepted], and +<item> +@-fno-cpr@<nidx>-fno-cpr option</nidx> switches off the CPR (constructed product +result) analyser. +<item> @-fno-update-analysis@<nidx>-fno-update-analysis option</nidx> (update analyser, because it sometimes takes a <em>long</em> time). This one is only enabled with -O2 anyway. +</itemize> Should you wish to turn individual flags <em>on</em>, you are advised to use the @-Ofile@ option, described above. Because the order in diff --git a/ghc/driver/ghc.lprl b/ghc/driver/ghc.lprl index b9d4ef2f1f62dffbf4af16f5903412cb8ee999c4..8951f16ad403cdfbca55bfcd540598c1e309aab4 100644 --- a/ghc/driver/ghc.lprl +++ b/ghc/driver/ghc.lprl @@ -228,6 +228,7 @@ sub setupOptFlags { $Oopt_FinalStgProfilingMassage = ''; $Oopt_StgStats = ''; $Oopt_DoSpecialise = '-fspecialise'; + $Oopt_DoCpr = '-fcpr-analyse'; $Oopt_FoldrBuild = 0; # *Off* by default! $Oopt_UsageSPInf = ''; # Off by default } # end of setupOptFlags @@ -766,7 +767,7 @@ sub setupOptimiseFlags { '-fstrictness', - '-fcpr-analyse', + $Oopt_DoCpr, '-fworker-wrapper', '-fsimplify', @@ -3086,6 +3087,9 @@ arg: while($_ = $Args[0]) { /^-fno-speciali[sz]e$/ && do { $Oopt_DoSpecialise = ''; next arg; }; + /^-fno-cpr$/ + && do { $Oopt_DoCpr = ''; next arg; }; + /^-fusagesp$/ && do { $Oopt_UsageSPInf = '-fusagesp'; push (@HsC_flags, '-fusagesp-on'); next arg; };