diff options
author | Simon Marlow <marlowsd@gmail.com> | 2012-07-05 13:23:21 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2012-07-05 13:23:21 +0100 |
commit | bfbdbcb9c4fc7608c6eb6d3d1c645bfb501ecf0a (patch) | |
tree | a16feb6524e5961890bfff4e53e6fdbe2a91784c /compiler/main | |
parent | 3f0afabaf3e862d986279dc041b14b61e73f86d3 (diff) | |
download | haskell-bfbdbcb9c4fc7608c6eb6d3d1c645bfb501ecf0a.tar.gz |
Remove "fuel", adapt to Hoopl changes, fix warnings
Diffstat (limited to 'compiler/main')
-rw-r--r-- | compiler/main/CodeOutput.lhs | 25 | ||||
-rw-r--r-- | compiler/main/HscMain.hs | 3 | ||||
-rw-r--r-- | compiler/main/HscTypes.lhs | 6 |
3 files changed, 12 insertions, 22 deletions
diff --git a/compiler/main/CodeOutput.lhs b/compiler/main/CodeOutput.lhs index 3b2354479a..e92eb4f34c 100644 --- a/compiler/main/CodeOutput.lhs +++ b/compiler/main/CodeOutput.lhs @@ -14,7 +14,7 @@ import LlvmCodeGen ( llvmCodeGen ) import UniqSupply ( mkSplitUniqSupply ) import Finder ( mkStubPaths ) -import PprC ( writeCs ) +import PprC ( writeCs ) import OldCmmLint ( cmmLint ) import Packages import OldCmm ( RawCmmGroup ) @@ -45,9 +45,9 @@ import System.IO \begin{code} codeOutput :: DynFlags -> Module - -> ModLocation - -> ForeignStubs - -> [PackageId] + -> ModLocation + -> ForeignStubs + -> [PackageId] -> Stream IO RawCmmGroup () -- Compiled C-- -> IO (Bool{-stub_h_exists-}, Maybe FilePath{-stub_c_exists-}) @@ -64,16 +64,16 @@ codeOutput dflags this_mod location foreign_stubs pkg_deps cmm_stream { showPass dflags "CmmLint" ; case cmmLint (targetPlatform dflags) cmm of Just err -> do { log_action dflags dflags SevDump noSrcSpan defaultDumpStyle err - ; ghcExit dflags 1 - } - Nothing -> return () + ; ghcExit dflags 1 + } + Nothing -> return () ; return cmm } - ; showPass dflags "CodeOutput" - ; let filenm = hscOutName dflags - ; stubs_exist <- outputForeignStubs dflags this_mod location foreign_stubs - ; case hscTarget dflags of { + ; showPass dflags "CodeOutput" + ; let filenm = hscOutName dflags + ; stubs_exist <- outputForeignStubs dflags this_mod location foreign_stubs + ; case hscTarget dflags of { HscInterpreted -> return (); HscAsm -> outputAsm dflags filenm linted_cmm_stream; HscC -> outputC dflags filenm linted_cmm_stream pkg_deps; @@ -127,7 +127,7 @@ outputC dflags filenm cmm_stream packages doOutput filenm $ \ h -> do hPutStr h ("/* GHC_PACKAGES " ++ unwords pkg_names ++ "\n*/\n") - hPutStr h cc_injects + hPutStr h cc_injects writeCs dflags h rawcmms \end{code} @@ -256,4 +256,3 @@ outputForeignStubs_help fname doc_str header footer = do writeFile fname (header ++ doc_str ++ '\n':footer ++ "\n") return True \end{code} - diff --git a/compiler/main/HscMain.hs b/compiler/main/HscMain.hs index eecf81455c..0b03e83029 100644 --- a/compiler/main/HscMain.hs +++ b/compiler/main/HscMain.hs @@ -125,7 +125,6 @@ import CmmParse ( parseCmmFile ) import CmmBuildInfoTables import CmmPipeline import CmmInfo -import OptimizationFuel ( initOptFuelState ) import CmmCvt import CodeOutput import NameEnv ( emptyNameEnv ) @@ -175,7 +174,6 @@ newHscEnv dflags = do nc_var <- newIORef (initNameCache us knownKeyNames) fc_var <- newIORef emptyUFM mlc_var <- newIORef emptyModuleEnv - optFuel <- initOptFuelState return HscEnv { hsc_dflags = dflags, hsc_targets = [], hsc_mod_graph = [], @@ -185,7 +183,6 @@ newHscEnv dflags = do hsc_NC = nc_var, hsc_FC = fc_var, hsc_MLC = mlc_var, - hsc_OptFuel = optFuel, hsc_type_env_var = Nothing } diff --git a/compiler/main/HscTypes.lhs b/compiler/main/HscTypes.lhs index 156f081d3e..adaa9a3171 100644 --- a/compiler/main/HscTypes.lhs +++ b/compiler/main/HscTypes.lhs @@ -142,7 +142,6 @@ import Packages hiding ( Version(..) ) import DynFlags import DriverPhases import BasicTypes -import OptimizationFuel ( OptFuelState ) import IfaceSyn import CoreSyn ( CoreRule, CoreVect ) import Maybes @@ -318,11 +317,6 @@ data HscEnv -- ^ This caches the location of modules, so we don't have to -- search the filesystem multiple times. See also 'hsc_FC'. - hsc_OptFuel :: OptFuelState, - -- ^ Settings to control the use of \"optimization fuel\": - -- by limiting the number of transformations, - -- we can use binary search to help find compiler bugs. - hsc_type_env_var :: Maybe (Module, IORef TypeEnv) -- ^ Used for one-shot compilation only, to initialise -- the 'IfGblEnv'. See 'TcRnTypes.tcg_type_env_var' for |