X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FDynFlags.hs;h=47cc3fe1f58f6e6a3c7dc63d609e2cde5e3c5345;hb=eaeca51efc0be3ff865c4530137bfbe9f8553549;hp=e3fd4267f1baf27c1d76c5cab0ec7dab3d2a9ab5;hpb=1d34bd56c9dde4dad72d3e8a4cfabdf11337dfb3;p=ghc-hetmet.git diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs index e3fd426..47cc3fe 100644 --- a/compiler/main/DynFlags.hs +++ b/compiler/main/DynFlags.hs @@ -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,