X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fmain%2FDriverState.hs;h=0500b66f36170deccda2c13b4c3c82f8d169f2be;hb=50027272414438955dbc41696541cbd25da55883;hp=ab070951b69f1a309b0b31e31e1cc6a654231026;hpb=7b4d23eff4a772e031a81a1f218a7354ee0ac98c;p=ghc-hetmet.git diff --git a/ghc/compiler/main/DriverState.hs b/ghc/compiler/main/DriverState.hs index ab07095..0500b66 100644 --- a/ghc/compiler/main/DriverState.hs +++ b/ghc/compiler/main/DriverState.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: DriverState.hs,v 1.26 2001/02/01 11:47:53 simonmar Exp $ +-- $Id: DriverState.hs,v 1.35 2001/03/23 16:36:20 simonmar Exp $ -- -- Settings for the driver -- @@ -119,43 +119,6 @@ GLOBAL_VAR(v_Hi_on_stdout, False, Bool) GLOBAL_VAR(v_Hi_suf, "hi", String) ----------------------------------------------------------------------------- --- Warnings & sanity checking - --- Warning packages that are controlled by -W and -Wall. The 'standard' --- warnings that you get all the time are --- --- -fwarn-overlapping-patterns --- -fwarn-missing-methods --- -fwarn-missing-fields --- -fwarn-deprecations --- -fwarn-duplicate-exports --- --- these are turned off by -Wnot. - - -standardWarnings = [ "-fwarn-overlapping-patterns" - , "-fwarn-missing-methods" - , "-fwarn-missing-fields" - , "-fwarn-deprecations" - , "-fwarn-duplicate-exports" - ] -minusWOpts = standardWarnings ++ - [ "-fwarn-unused-binds" - , "-fwarn-unused-matches" - , "-fwarn-incomplete-patterns" - , "-fwarn-unused-imports" - ] -minusWallOpts = minusWOpts ++ - [ "-fwarn-type-defaults" - , "-fwarn-name-shadowing" - , "-fwarn-missing-signatures" - , "-fwarn-hi-shadowing" - ] - -data WarningState = W_default | W_ | W_all | W_not -GLOBAL_VAR(v_Warning_opt, W_default, WarningState) - ------------------------------------------------------------------------------ -- Compiler optimisation options GLOBAL_VAR(v_OptLevel, 0, Int) @@ -181,16 +144,20 @@ hsc_minusNoO_flags = [ "-fignore-interface-pragmas", "-fomit-interface-pragmas", + "-fdo-lambda-eta-expansion", -- This one is important for a tiresome reason: + -- we want to make sure that the bindings for data + -- constructors are eta-expanded. This is probably + -- a good thing anyway, but it seems fragile. "-flet-no-escape" ] -- these are the static flags you get when -O is on. hsc_minusO_flags = [ + "-fignore-asserts", "-ffoldr-build-on", "-fdo-eta-reduction", "-fdo-lambda-eta-expansion", - "-fcase-of-case", "-fcase-merge", "-flet-to-case", "-flet-no-escape" @@ -313,6 +280,10 @@ buildCoreToDo = do CoreLiberateCase else CoreDoNothing, + if opt_level >= 2 then + CoreDoSpecConstr + else + CoreDoNothing, -- Final clean-up simplification: CoreDoSimplify (isAmongSimpl [ @@ -351,6 +322,8 @@ addToDirList ref path = do paths <- readIORef ref writeIORef ref (paths ++ split split_marker path) +GLOBAL_VAR(v_HCHeader, "", String) + ----------------------------------------------------------------------------- -- Packages @@ -416,19 +389,19 @@ getPackageExtraLdOpts = do ps <- getPackageInfo return (concatMap extra_ld_opts ps) -getPackageInfo :: IO [Package] +getPackageInfo :: IO [PackageConfig] getPackageInfo = do ps <- readIORef v_Packages getPackageDetails ps -getPackageDetails :: [String] -> IO [Package] +getPackageDetails :: [String] -> IO [PackageConfig] getPackageDetails ps = do pkg_details <- readIORef v_Package_details return [ pkg | p <- ps, Just pkg <- [ lookupPkg p pkg_details ] ] -GLOBAL_VAR(v_Package_details, (error "package_details"), [Package]) +GLOBAL_VAR(v_Package_details, (error "package_details"), [PackageConfig]) -lookupPkg :: String -> [Package] -> Maybe Package +lookupPkg :: String -> [PackageConfig] -> Maybe PackageConfig lookupPkg nm ps = case [p | p <- ps, name p == nm] of [] -> Nothing @@ -536,14 +509,45 @@ way_details = (WayUnreg, Way "u" "Unregisterised" unregFlags ), + -- optl's below to tell linker where to find the PVM library -- HWL (WayPar, Way "mp" "Parallel" [ "-fparallel" , "-D__PARALLEL_HASKELL__" , "-optc-DPAR" , "-package concurrent" + , "-optc-w" + , "-optl-L${PVM_ROOT}/lib/${PVM_ARCH}" + , "-optl-lpvm3" + , "-optl-lgpvm3" + , "-fvia-C" ]), + + -- at the moment we only change the RTS and could share compiler and libs! + (WayPar, Way "mt" "Parallel ticky profiling" + [ "-fparallel" + , "-D__PARALLEL_HASKELL__" + , "-optc-DPAR" + , "-optc-DPAR_TICKY" + , "-package concurrent" + , "-optc-w" + , "-optl-L${PVM_ROOT}/lib/${PVM_ARCH}" + , "-optl-lpvm3" + , "-optl-lgpvm3" + , "-fvia-C" ]), + + (WayPar, Way "md" "Distributed" + [ "-fparallel" + , "-D__PARALLEL_HASKELL__" + , "-D__DISTRIBUTED_HASKELL__" + , "-optc-DPAR" + , "-optc-DDIST" + , "-package concurrent" + , "-optc-w" + , "-optl-L${PVM_ROOT}/lib/${PVM_ARCH}" + , "-optl-lpvm3" + , "-optl-lgpvm3" , "-fvia-C" ]), - (WayGran, Way "mg" "Gransim" + (WayGran, Way "mg" "GranSim" [ "-fgransim" , "-D__GRANSIM__" , "-optc-DGRAN"