diff options
author | dias@eecs.harvard.edu <unknown> | 2008-05-29 09:48:27 +0000 |
---|---|---|
committer | dias@eecs.harvard.edu <unknown> | 2008-05-29 09:48:27 +0000 |
commit | 25628e2771424cae1b3366322e8ce6f8a85440f9 (patch) | |
tree | 98c7d5c5f397263cb218f565b24521d6006235f6 /compiler/main/Main.hs | |
parent | f0ffb7da8edb184558ab6fb5e0a9899f89572333 (diff) | |
download | haskell-25628e2771424cae1b3366322e8ce6f8a85440f9.tar.gz |
Cmm back end upgrades
Several changes in this patch, partially bug fixes, partially new code:
o bug fixes in ZipDataflow
- added some checks to verify that facts converge
- removed some erroneous checks of convergence on entry nodes
- added some missing applications of transfer functions
o changed dataflow clients to use ZipDataflow, making ZipDataflow0 obsolete
o eliminated DFA monad (no need for separate analysis and rewriting monads with ZipDataflow)
o started stack layout changes
- no longer generating CopyIn and CopyOut nodes (not yet fully expunged though)
- still not using proper calling conventions
o simple new optimizations:
- common block elimination
-- have not yet tried to move the Adams opt out of CmmProcPointZ
- block concatenation
o piped optimization fuel up to the HscEnv
- can be limited by a command-line flag
- not tested, and probably not yet properly used by clients
o added unique supply to FuelMonad, also lifted unique supply to DFMonad
Diffstat (limited to 'compiler/main/Main.hs')
-rw-r--r-- | compiler/main/Main.hs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler/main/Main.hs b/compiler/main/Main.hs index 4c31fcda90..f0a6611cf7 100644 --- a/compiler/main/Main.hs +++ b/compiler/main/Main.hs @@ -30,6 +30,7 @@ import InteractiveUI ( interactiveUI, ghciWelcomeMsg ) -- Various other random stuff that we need import Config +import HscTypes import Packages ( dumpPackages ) import DriverPhases ( Phase(..), isSourceFilename, anyHsc, startPhase, isHaskellSrcFilename ) @@ -137,7 +138,8 @@ main = -- we've finished manipulating the DynFlags, update the session GHC.setSessionDynFlags session dflags - dflags <- GHC.getSessionDynFlags session + dflags <- GHC.getSessionDynFlags session + hsc_env <- GHC.sessionHscEnv session let -- To simplify the handling of filepaths, we normalise all filepaths right @@ -172,7 +174,7 @@ main = ShowInterface f -> doShowIface dflags f DoMake -> doMake session srcs DoMkDependHS -> doMkDependHS session (map fst srcs) - StopBefore p -> oneShot dflags p srcs + StopBefore p -> oneShot hsc_env p srcs DoInteractive -> interactiveUI session srcs Nothing DoEval exprs -> interactiveUI session srcs $ Just $ reverse exprs @@ -431,8 +433,8 @@ doMake sess srcs = do haskellish (_,Just phase) = phase `notElem` [As, Cc, CmmCpp, Cmm, StopLn] - dflags <- GHC.getSessionDynFlags sess - o_files <- mapM (compileFile dflags StopLn) non_hs_srcs + hsc_env <- GHC.sessionHscEnv sess + o_files <- mapM (compileFile hsc_env StopLn) non_hs_srcs mapM_ (consIORef v_Ld_inputs) (reverse o_files) targets <- mapM (uncurry GHC.guessTarget) hs_srcs |