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
Glasgow Haskell Compiler
GHC
Commits
c8bebd3d
Commit
c8bebd3d
authored
Sep 15, 2007
by
nr@eecs.harvard.edu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add another way to run in the fuel monad (this is a mess right now)
parent
d5036717
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
compiler/cmm/DFMonad.hs
compiler/cmm/DFMonad.hs
+6
-0
No files found.
compiler/cmm/DFMonad.hs
View file @
c8bebd3d
...
...
@@ -2,6 +2,7 @@
module
DFMonad
(
OptimizationFuel
,
DFTx
,
runDFTx
,
lastTxPass
,
txDecrement
,
txRemaining
,
txExhausted
,
functionalDFTx
,
DataflowLattice
(
..
)
,
DataflowAnalysis
...
...
@@ -108,6 +109,11 @@ runDFA lattice (DFA f) = fst $ f lattice initDFAState
-- XXX DFTx really needs to be in IO, so we can dump programs in
-- intermediate states of optimization ---NR
functionalDFTx
::
String
->
(
OptimizationFuel
->
(
a
,
OptimizationFuel
))
->
DFTx
a
functionalDFTx
name
pass
=
DFTx
f
where
f
s
=
let
(
a
,
fuel
)
=
pass
(
df_txlimit
s
)
in
(
a
,
DFTxState
fuel
name
)
runDFTx
::
OptimizationFuel
->
DFTx
a
->
a
--- should only be called once per program!
runDFTx
lim
(
DFTx
f
)
=
fst
$
f
$
DFTxState
lim
"<none>"
...
...
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