#include "HsVersions.h"
+#ifndef OMIT_NATIVE_CODEGEN
import Platform
+#endif
import Module
import PackageConfig
import PrelNames ( mAIN, main_RDR_Unqual )
specConstrCount :: Maybe Int, -- ^ Max number of specialisations for any one function
liberateCaseThreshold :: Maybe Int, -- ^ Threshold for LiberateCase
+#ifndef OMIT_NATIVE_CODEGEN
targetPlatform :: Platform, -- ^ The platform we're compiling for. Used by the NCG.
+#endif
stolen_x86_regs :: Int,
cmdlineHcIncludes :: [String], -- ^ @\-\#includes@
importPaths :: [FilePath],
specConstrThreshold = Just 200,
specConstrCount = Just 3,
liberateCaseThreshold = Just 200,
+#ifndef OMIT_NATIVE_CODEGEN
targetPlatform = defaultTargetPlatform,
+#endif
stolen_x86_regs = 4,
cmdlineHcIncludes = [],
importPaths = ["."],
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
-- 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,