projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve handling of -fdph-* flags
[ghc-hetmet.git]
/
compiler
/
main
/
DynFlags.hs
diff --git
a/compiler/main/DynFlags.hs
b/compiler/main/DynFlags.hs
index
3fcb628
..
9e2d24b
100644
(file)
--- a/
compiler/main/DynFlags.hs
+++ b/
compiler/main/DynFlags.hs
@@
-21,7
+21,7
@@
module DynFlags (
Option(..),
DynLibLoader(..),
fFlags, xFlags,
Option(..),
DynLibLoader(..),
fFlags, xFlags,
- DPHBackend(..),
+ dphPackage,
-- ** Manipulating DynFlags
defaultDynFlags, -- DynFlags
-- ** Manipulating DynFlags
defaultDynFlags, -- DynFlags
@@
-892,7
+892,7
@@
data CoreToDo -- These are diff core-to-core passes,
| CoreCSE
| CoreDoRuleCheck Int{-CompilerPhase-} String -- Check for non-application of rules
-- matching this string
| CoreCSE
| CoreDoRuleCheck Int{-CompilerPhase-} String -- Check for non-application of rules
-- matching this string
- | CoreDoVectorisation DPHBackend
+ | CoreDoVectorisation PackageId
| CoreDoNothing -- Useful when building up
| CoreDoPasses [CoreToDo] -- lists of these things
| CoreDoNothing -- Useful when building up
| CoreDoPasses [CoreToDo] -- lists of these things
@@
-947,7
+947,7
@@
getCoreToDo dflags
vectorisation
= runWhen (dopt Opt_Vectorise dflags)
vectorisation
= runWhen (dopt Opt_Vectorise dflags)
- $ CoreDoPasses [ simpl_gently, CoreDoVectorisation (dphBackend dflags) ]
+ $ CoreDoPasses [ simpl_gently, CoreDoVectorisation (dphPackage dflags) ]
-- By default, we have 2 phases before phase 0.
-- By default, we have 2 phases before phase 0.
@@
-1888,6
+1888,12
@@
setDPHBackend backend
dph_packages DPHPar = ["dph-prim-par", "dph-par"]
dph_packages DPHSeq = ["dph-prim-seq", "dph-seq"]
dph_packages DPHPar = ["dph-prim-par", "dph-par"]
dph_packages DPHSeq = ["dph-prim-seq", "dph-seq"]
+dphPackage :: DynFlags -> PackageId
+dphPackage dflags = case dphBackend dflags of
+ DPHPar -> dphParPackageId
+ DPHSeq -> dphSeqPackageId
+ DPHThis -> thisPackage dflags
+
setMainIs :: String -> DynP ()
setMainIs arg
| not (null main_fn) && isLower (head main_fn)
setMainIs :: String -> DynP ()
setMainIs arg
| not (null main_fn) && isLower (head main_fn)