X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FDynFlags.hs;h=731ac29b498b5cc4adafced3bf759628bd8b1399;hb=49ea1fa53acd2569b0b74c86a981b0d3779515dd;hp=9a7de07c5ec0778a351aef5c9c62c54965eb8e42;hpb=ae019a20d2db44c52767f5cd6291f3276067446b;p=ghc-hetmet.git diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index 9a7de07..731ac29 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -145,6 +145,7 @@ data DynFlag | Opt_AllowUndecidableInstances | Opt_AllowIncoherentInstances | Opt_MonomorphismRestriction + | Opt_MonoPatBinds | Opt_GlasgowExts | Opt_FFI | Opt_PArr -- syntactic support for parallel arrays @@ -168,6 +169,7 @@ data DynFlag | Opt_DoEtaReduction | Opt_CaseMerge | Opt_UnboxStrictFields + | Opt_DictsCheap -- misc opts | Opt_Cpp @@ -391,6 +393,10 @@ defaultDynFlags = Opt_RecompChecking, Opt_ReadUserPackageConf, + Opt_MonoPatBinds, -- Experimentally, I'm making this non-standard + -- behaviour the default, to see if anyone notices + -- SLPJ July 06 + Opt_ImplicitPrelude, Opt_MonomorphismRestriction, Opt_Strictness, @@ -722,19 +728,27 @@ getCoreToDo dflags -- Case-liberation for -O2. This should be after -- strictness analysis and the simplification which follows it. - case rule_check of { Just pat -> CoreDoRuleCheck 0 pat; Nothing -> CoreDoNothing }, + case rule_check of { Just pat -> CoreDoRuleCheck 0 pat; Nothing -> CoreDoNothing } + ] - if opt_level >= 2 then - CoreLiberateCase - else - CoreDoNothing, - if opt_level >= 2 then - CoreDoSpecConstr - else - CoreDoNothing, + ++ + + (if opt_level >= 2 then + [ CoreLiberateCase, + CoreDoSimplify (SimplPhase 0) [ + MaxSimplifierIterations max_iter + ], -- Run the simplifier after LiberateCase to vastly + -- reduce the possiblility of shadowing + -- Reason: see Note [Shadowing] in SpecConstr.lhs + CoreDoSpecConstr + ] + else + []) + + ++ -- Final clean-up simplification: - CoreDoSimplify (SimplPhase 0) [ + [ CoreDoSimplify (SimplPhase 0) [ MaxSimplifierIterations max_iter ] ] @@ -983,6 +997,7 @@ fFlags = [ ( "scoped-type-variables", Opt_ScopedTypeVariables ), ( "bang-patterns", Opt_BangPatterns ), ( "monomorphism-restriction", Opt_MonomorphismRestriction ), + ( "mono-pat-binds", Opt_MonoPatBinds ), ( "implicit-params", Opt_ImplicitParams ), ( "allow-overlapping-instances", Opt_AllowOverlappingInstances ), ( "allow-undecidable-instances", Opt_AllowUndecidableInstances ), @@ -999,6 +1014,7 @@ fFlags = [ ( "do-eta-reduction", Opt_DoEtaReduction ), ( "case-merge", Opt_CaseMerge ), ( "unbox-strict-fields", Opt_UnboxStrictFields ), + ( "dicts-cheap", Opt_DictsCheap ), ( "excess-precision", Opt_ExcessPrecision ), ( "asm-mangling", Opt_DoAsmMangling ) ] @@ -1248,6 +1264,13 @@ machdepCCOpts dflags -- -fomit-frame-pointer, so we disable it first here. "-mno-omit-leaf-frame-pointer", #endif +#ifdef HAVE_GCC_HAS_NO_UNIT_AT_A_TIME + "-fno-unit-at-a-time", + -- unit-at-a-time doesn't do us any good, and screws + -- up -split-objs by moving the split markers around. + -- It's only turned on with -O2, but put it here just + -- in case someone uses -optc-O2. +#endif "-fomit-frame-pointer", -- we want -fno-builtin, because when gcc inlines -- built-in functions like memcpy() it tends to