Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
20765b55
Commit
20765b55
authored
Jun 24, 1999
by
simonmar
Browse files
[project @ 1999-06-24 12:25:58 by simonmar]
Minor cleanup
parent
53806509
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/simplStg/SimplStg.lhs
View file @
20765b55
...
...
@@ -47,13 +47,13 @@ stg2stg :: [StgToDo] -- spec of what stg-to-stg passes to do
stg2stg stg_todos module_name us binds
= case (splitUniqSupply us) of { (us4now, us4later) ->
doIfSet
d
o_verbose_stg2stg
(printErrs (text "VERBOSE STG-TO-STG:" $$
text "***
Core2Stg
:
"
$$
vcat (map ppr (setStgVarInfo False binds)))) >
>
doIfSet o
pt_D
_verbose_stg2stg
(printErrs (text "VERBOSE STG-TO-STG:")) >>
end_pass us4now "
Core2Stg"
([],[],[]) binds
>>= \ (binds', us, ccs) -
>
-- Do the main business!
foldl_mn do_stg_pass (binds, us
4now, ([],[],[])
) stg_todos
foldl_mn do_stg_pass (binds
'
, us
, ccs
) stg_todos
>>= \ (processed_binds, _, cost_centres) ->
-- Do essential wind-up
...
...
@@ -70,7 +70,7 @@ stg2stg stg_todos module_name us binds
--
let
annotated_binds = setStgVarInfo
do_let_no_e
scapes processed_binds
annotated_binds = setStgVarInfo
opt_StgDoLetNoE
scapes processed_binds
srt_binds = computeSRTs annotated_binds
in
...
...
@@ -79,10 +79,8 @@ stg2stg stg_todos module_name us binds
return (srt_binds, cost_centres)
}
where
do_let_no_escapes = opt_StgDoLetNoEscapes
do_verbose_stg2stg = opt_D_verbose_stg2stg
where
grp_name = case (opt_SccGroup) of
Just xx -> _PK_ xx
Nothing -> _PK_ (moduleString module_name) -- default: module name
...
...
@@ -115,7 +113,7 @@ stg2stg stg_todos module_name us binds
_scc_ "StgLambdaLift"
-- NB We have to do setStgVarInfo first!
let
binds3 = liftProgram module_name us1 (setStgVarInfo
do_let_no_e
scapes binds)
binds3 = liftProgram module_name us1 (setStgVarInfo
opt_StgDoLetNoE
scapes binds)
in
end_pass us2 "LambdaLift" ccs binds3
...
...
@@ -129,7 +127,7 @@ stg2stg stg_todos module_name us binds
end_pass us2 what ccs binds2
= -- report verbosely, if required
(if
d
o_verbose_stg2stg then
(if o
pt_D
_verbose_stg2stg then
hPutStr stderr (showSDoc
(text ("*** "++what++":") $$ vcat (map ppr binds2)
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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