X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FDynFlags.hs;h=8bf069c44cefd62bd59950da8b420b8ef50d25b6;hb=431e40e1a2f795d5069d97661b7cd55f3e3b05bf;hp=e3fd4267f1baf27c1d76c5cab0ec7dab3d2a9ab5;hpb=1d34bd56c9dde4dad72d3e8a4cfabdf11337dfb3;p=ghc-hetmet.git diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index e3fd426..8bf069c 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -72,7 +72,7 @@ import PackageConfig import PrelNames ( mAIN, main_RDR_Unqual ) import RdrName ( RdrName, mkRdrUnqual ) import OccName ( mkVarOccFS ) -#ifdef i386_TARGET_ARCH +#if defined(i386_TARGET_ARCH) || ! defined(mingw32_TARGET_OS) import StaticFlags ( opt_Static ) #endif import StaticFlags ( opt_PIC, WayName(..), v_Ways, v_Build_tag, @@ -1000,8 +1000,8 @@ pprFloatOutSwitches sw = pp_not (floatOutLambdas sw) <+> text "lambdas" <> comma pp_not False = text "not" -- | Switches that specify the minimum amount of floating out -gentleFloatOutSwitches :: FloatOutSwitches -gentleFloatOutSwitches = FloatOutSwitches False False +-- gentleFloatOutSwitches :: FloatOutSwitches +-- gentleFloatOutSwitches = FloatOutSwitches False False -- | Switches that do not specify floating out of lambdas, just of constants constantsOnlyFloatOutSwitches :: FloatOutSwitches @@ -1103,7 +1103,14 @@ getCoreToDo dflags -- so that overloaded functions have all their dictionary lambdas manifest CoreDoSpecialising, - runWhen full_laziness (CoreDoFloatOutwards gentleFloatOutSwitches), + runWhen full_laziness (CoreDoFloatOutwards constantsOnlyFloatOutSwitches), + -- Was: gentleFloatOutSwitches + -- I have no idea why, but not floating constants to top level is + -- very bad in some cases. + -- Notably: p_ident in spectral/rewrite + -- Changing from "gentle" to "constantsOnly" improved + -- rewrite's allocation by 19%, and made 0.0% difference + -- to any other nofib benchmark CoreDoFloatInwards, @@ -1802,6 +1809,8 @@ impliedFlags -- be completely rigid for GADTs , (Opt_TypeFamilies, Opt_RelaxedPolyRec) -- Trac #2944 gives a nice example + , (Opt_TypeFamilies, Opt_KindSignatures) -- Type families use kind signatures + -- all over the place , (Opt_ScopedTypeVariables, Opt_RelaxedPolyRec) -- Ditto for scoped type variables; see -- Note [Scoped tyvars] in TcBinds @@ -2296,7 +2305,7 @@ picCCOpts _dflags | otherwise = [] #else - | opt_PIC + | opt_PIC || not opt_Static = ["-fPIC", "-U __PIC__", "-D__PIC__"] | otherwise = []