Commit 9c966bfa authored by rl@cse.unsw.edu.au's avatar rl@cse.unsw.edu.au
Browse files

Add -fdph-this

parent 44ee866e
...@@ -1440,6 +1440,9 @@ dynamic_flags = [ ...@@ -1440,6 +1440,9 @@ dynamic_flags = [
, Flag "fdph-par" , Flag "fdph-par"
(NoArg (setDPHBackend DPHPar)) (NoArg (setDPHBackend DPHPar))
Supported Supported
, Flag "fdph-this"
(NoArg (setDPHBackend DPHThis))
Supported
------ Compiler flags ----------------------------------------------- ------ Compiler flags -----------------------------------------------
...@@ -1872,16 +1875,18 @@ setDPHOpt dflags = setOptLevel 2 (dflags { maxSimplIterations = 20 ...@@ -1872,16 +1875,18 @@ setDPHOpt dflags = setOptLevel 2 (dflags { maxSimplIterations = 20
data DPHBackend = DPHPar data DPHBackend = DPHPar
| DPHSeq | DPHSeq
| DPHThis
deriving(Eq, Ord, Enum, Show)
setDPHBackend :: DPHBackend -> DynP () setDPHBackend :: DPHBackend -> DynP ()
setDPHBackend backend setDPHBackend backend
= do = do
upd $ \dflags -> dflags { dphBackend = backend } upd $ \dflags -> dflags { dphBackend = backend }
exposePackage $ "dph-prim-" ++ suffix backend mapM_ exposePackage (dph_packages backend)
exposePackage $ "dph-" ++ suffix backend
where where
suffix DPHPar = "par" dph_packages DPHThis = []
suffix DPHSeq = "seq" dph_packages DPHPar = ["dph-prim-par", "dph-par"]
dph_packages DPHSeq = ["dph-prim-seq", "dph-seq"]
setMainIs :: String -> DynP () setMainIs :: String -> DynP ()
setMainIs arg setMainIs arg
......
...@@ -53,6 +53,7 @@ vectorise backend hsc_env _ _ guts ...@@ -53,6 +53,7 @@ vectorise backend hsc_env _ _ guts
backendPackage DPHSeq = dphSeqPackageId backendPackage DPHSeq = dphSeqPackageId
backendPackage DPHPar = dphParPackageId backendPackage DPHPar = dphParPackageId
backendPackage DPHThis = thisPackage dflags
vectModule :: ModGuts -> VM ModGuts vectModule :: ModGuts -> VM ModGuts
vectModule guts vectModule guts
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment