X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fmain%2FCmdLineOpts.lhs;h=6cf2f3da374bcbcac9fa1b24cdb63fa9290caa83;hb=3a223cd2811d46295048b3a2dab11403ca291b20;hp=2589fd04bfebd88e9eee92bca36cb26b59a543b9;hpb=950c1ecaffcb6e8d7cefb20b8372691182c6c304;p=ghc-hetmet.git diff --git a/ghc/compiler/main/CmdLineOpts.lhs b/ghc/compiler/main/CmdLineOpts.lhs index 2589fd0..6cf2f3d 100644 --- a/ghc/compiler/main/CmdLineOpts.lhs +++ b/ghc/compiler/main/CmdLineOpts.lhs @@ -73,11 +73,11 @@ module CmdLineOpts ( -- optimisation opts opt_NoMethodSharing, opt_DoSemiTagging, - opt_FoldrBuildOn, opt_LiberateCaseThreshold, opt_StgDoLetNoEscapes, opt_UnfoldCasms, - opt_UsageSPOn, + opt_CprOff, + opt_RulesOff, opt_UnboxStrictFields, opt_SimplNoPreInlining, opt_SimplDoEtaReduction, @@ -107,7 +107,6 @@ module CmdLineOpts ( opt_NoHiCheck, opt_OmitBlackHoling, opt_OmitInterfacePragmas, - opt_NoPruneTyDecls, opt_NoPruneDecls, opt_Static, opt_Unregisterised, @@ -116,15 +115,15 @@ module CmdLineOpts ( #include "HsVersions.h" -import GlaExts -import IOExts ( IORef, readIORef, writeIORef ) import Constants -- Default values for some flags import Util -import FastTypes import FastString ( FastString, mkFastString ) import Config - import Maybes ( firstJust ) + +import GLAEXTS +import DATA_IOREF ( IORef, readIORef, writeIORef ) +import UNSAFE_IO ( unsafePerformIO ) \end{code} %************************************************************************ @@ -185,8 +184,7 @@ data CoreToDo -- These are diff core-to-core passes, | CoreDoWorkerWrapper | CoreDoSpecialising | CoreDoSpecConstr - | CoreDoUSPInf - | CoreDoCPResult + | CoreDoOldStrictness | CoreDoGlomBinds | CoreCSE | CoreDoRuleCheck Int{-CompilerPhase-} String -- Check for non-application of rules @@ -249,7 +247,6 @@ data DynFlag | Opt_D_dump_tc | Opt_D_dump_types | Opt_D_dump_rules - | Opt_D_dump_usagesp | Opt_D_dump_cse | Opt_D_dump_worker_wrapper | Opt_D_dump_rn_trace @@ -257,6 +254,7 @@ data DynFlag | Opt_D_dump_stix | Opt_D_dump_simpl_stats | Opt_D_dump_tc_trace + | Opt_D_dump_splices | Opt_D_dump_BCOs | Opt_D_dump_vect | Opt_D_source_stats @@ -267,8 +265,8 @@ data DynFlag | Opt_D_dump_minimal_imports | Opt_DoCoreLinting | Opt_DoStgLinting - | Opt_DoUSPLinting + | Opt_WarnIsError -- -Werror; makes warnings fatal | Opt_WarnDuplicateExports | Opt_WarnHiShadows | Opt_WarnIncompletePatterns @@ -291,7 +289,10 @@ data DynFlag | Opt_AllowIncoherentInstances | Opt_NoMonomorphismRestriction | Opt_GlasgowExts + | Opt_FFI | Opt_PArr -- syntactic support for parallel arrays + | Opt_With -- deprecated keyword for implicit parms + | Opt_Arrows -- Arrow-notation syntax | Opt_Generics | Opt_NoImplicitPrelude @@ -339,7 +340,8 @@ data HscLang defaultHscLang | cGhcWithNativeCodeGen == "YES" && (prefixMatch "i386" cTARGETPLATFORM || - prefixMatch "sparc" cTARGETPLATFORM) = HscAsm + prefixMatch "sparc" cTARGETPLATFORM || + prefixMatch "powerpc" cTARGETPLATFORM) = HscAsm | otherwise = HscC defaultDynFlags = DynFlags { @@ -363,7 +365,9 @@ defaultDynFlags = DynFlags { opt_I = [], opt_i = [], #endif - flags = standardWarnings, + flags = [Opt_Generics] ++ standardWarnings, + -- Generating the helper-functions for + -- generics is now on by default } {- @@ -540,7 +544,7 @@ unpacked_opts :: [String] unpacked_opts = concat $ map (expandAts) $ - map _UNPK_ argv -- NOT ARGV any more: v_Static_hsc_opts + map unpackFS argv -- NOT ARGV any more: v_Static_hsc_opts where expandAts ('@':fname) = words (unsafePerformIO (readFile fname)) expandAts l = [l] @@ -581,11 +585,12 @@ opt_Flatten = lookUp FSLIT("-fflatten") -- optimisation opts opt_NoMethodSharing = lookUp FSLIT("-fno-method-sharing") opt_DoSemiTagging = lookUp FSLIT("-fsemi-tagging") -opt_FoldrBuildOn = lookUp FSLIT("-ffoldr-build-on") +opt_CprOff = lookUp FSLIT("-fcpr-off") +opt_RulesOff = lookUp FSLIT("-frules-off") + -- Switch off CPR analysis in the new demand analyser opt_LiberateCaseThreshold = lookup_def_int "-fliberate-case-threshold" (10::Int) opt_StgDoLetNoEscapes = lookUp FSLIT("-flet-no-escape") opt_UnfoldCasms = lookUp FSLIT("-funfold-casms-in-hi-file") -opt_UsageSPOn = lookUp FSLIT("-fusagesp-on") opt_UnboxStrictFields = lookUp FSLIT("-funbox-strict-fields") opt_MaxWorkerArgs = lookup_def_int "-fmax-worker-args" (10::Int) @@ -595,7 +600,7 @@ opt_MaxWorkerArgs = lookup_def_int "-fmax-worker-args" (10::Int) The Prelude, for example is compiled with '-inpackage std' -} opt_InPackage = case lookup_str "-inpackage=" of - Just p -> _PK_ p + Just p -> mkFastString p Nothing -> FSLIT("Main") -- The package name if none is specified opt_EmitCExternDecls = lookUp FSLIT("-femit-extern-decls") @@ -630,7 +635,6 @@ opt_UF_CheapOp = ( 1 :: Int) -- Only one instruction; and the args are charged opt_UF_DearOp = ( 4 :: Int) opt_NoPruneDecls = lookUp FSLIT("-fno-prune-decls") -opt_NoPruneTyDecls = lookUp FSLIT("-fno-prune-tydecls") opt_Static = lookUp FSLIT("-static") opt_Unregisterised = lookUp FSLIT("-funregisterised") opt_EmitExternalCore = lookUp FSLIT("-fext-core") @@ -659,10 +663,8 @@ isStaticHscFlag f = "fsmp", "fflatten", "fsemi-tagging", - "ffoldr-build-on", "flet-no-escape", "funfold-casms-in-hi-file", - "fusagesp-on", "funbox-strict-fields", "femit-extern-decls", "fglobalise-toplev-names", @@ -681,11 +683,12 @@ isStaticHscFlag f = "fexcess-precision", "funfolding-update-in-place", "fno-prune-decls", - "fno-prune-tydecls", "static", "funregisterised", "fext-core", - "frule-check" + "frule-check", + "frules-off", + "fcpr-off" ] || any (flip prefixMatch f) [ "fcontext-stack",