Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
jberryman
GHC
Commits
8323847d
Commit
8323847d
authored
Jun 20, 2012
by
Ian Lynagh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make -fgransim a dynamic flag
parent
ad3d65cd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
15 deletions
+14
-15
compiler/codeGen/CgParallel.hs
compiler/codeGen/CgParallel.hs
+12
-10
compiler/main/DynFlags.hs
compiler/main/DynFlags.hs
+2
-0
compiler/main/StaticFlagParser.hs
compiler/main/StaticFlagParser.hs
+0
-1
compiler/main/StaticFlags.hs
compiler/main/StaticFlags.hs
+0
-4
No files found.
compiler/codeGen/CgParallel.hs
View file @
8323847d
...
...
@@ -16,12 +16,14 @@ module CgParallel(
import
CgMonad
import
CgCallConv
import
DynFlags
import
Id
import
OldCmm
import
StaticFlags
import
Outputable
import
SMRep
import
Control.Monad
staticParHdr
::
[
CmmLit
]
-- Parallel header words in a static closure
staticParHdr
=
[]
...
...
@@ -37,8 +39,8 @@ staticGranHdr = []
doGranAllocate
::
CmmExpr
->
Code
-- macro DO_GRAN_ALLOCATE
doGranAllocate
_hp
|
not
opt_GranMacros
=
nopC
|
otherwise
=
panic
"doGranAllocate"
=
do
dflags
<-
getDynFlags
when
(
dopt
Opt_GranMacros
dflags
)
$
panic
"doGranAllocate"
...
...
@@ -48,11 +50,11 @@ granFetchAndReschedule :: [(Id,GlobalReg)] -- Live registers
->
Code
-- Emit code for simulating a fetch and then reschedule.
granFetchAndReschedule
regs
node_reqd
|
opt_GranMacros
&&
(
node
`
elem
`
map
snd
regs
||
node_reqd
)
=
do
{
fetch
;
reschedule
liveness
node_reqd
}
|
otherwise
=
nopC
=
do
dflags
<-
getDynFlags
when
(
dopt
Opt_GranMacros
dflags
&&
(
node
`
elem
`
map
snd
regs
||
node_reqd
))
$
do
fetch
reschedule
liveness
node_reqd
where
liveness
=
mkRegLiveness
regs
0
0
...
...
@@ -87,8 +89,8 @@ granYield :: [(Id,GlobalReg)] -- Live registers
->
Code
granYield
regs
node_reqd
|
opt_GranMacros
&&
node_reqd
=
yield
livenes
s
|
otherwise
=
nopC
=
do
dflags
<-
getDynFlag
s
when
(
dopt
Opt_GranMacros
dflags
&&
node_reqd
)
$
yield
liveness
where
liveness
=
mkRegLiveness
regs
0
0
...
...
compiler/main/DynFlags.hs
View file @
8323847d
...
...
@@ -310,6 +310,7 @@ data DynFlag
|
Opt_HelpfulErrors
|
Opt_DeferTypeErrors
|
Opt_Parallel
|
Opt_GranMacros
-- output style opts
|
Opt_PprCaseAsLet
...
...
@@ -1987,6 +1988,7 @@ fFlags = [
(
"helpful-errors"
,
Opt_HelpfulErrors
,
nop
),
(
"defer-type-errors"
,
Opt_DeferTypeErrors
,
nop
),
(
"parallel"
,
Opt_Parallel
,
nop
),
(
"gransim"
,
Opt_GranMacros
,
nop
),
(
"building-cabal-package"
,
Opt_BuildingCabalPackage
,
nop
),
(
"implicit-import-qualified"
,
Opt_ImplicitImportQualified
,
nop
),
(
"prof-count-entries"
,
Opt_ProfCountEntries
,
nop
),
...
...
compiler/main/StaticFlagParser.hs
View file @
8323847d
...
...
@@ -170,7 +170,6 @@ isStaticFlag f =
"fscc-profiling"
,
"fdicts-strict"
,
"fspec-inline-join-points"
,
"fgransim"
,
"fno-hi-version-check"
,
"dno-black-holing"
,
"fno-state-hack"
,
...
...
compiler/main/StaticFlags.hs
View file @
8323847d
...
...
@@ -75,7 +75,6 @@ module StaticFlags (
-- misc opts
opt_ErrorSpans
,
opt_GranMacros
,
opt_HistorySize
,
opt_Unregisterised
,
v_Ld_inputs
,
...
...
@@ -275,9 +274,6 @@ opt_CprOff = lookUp (fsLit "-fcpr-off")
opt_MaxWorkerArgs
::
Int
opt_MaxWorkerArgs
=
lookup_def_int
"-fmax-worker-args"
(
10
::
Int
)
opt_GranMacros
::
Bool
opt_GranMacros
=
lookUp
(
fsLit
"-fgransim"
)
opt_HistorySize
::
Int
opt_HistorySize
=
lookup_def_int
"-fhistory-size"
20
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment