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
Shayne Fletcher
Glasgow Haskell Compiler
Commits
b7a8f31c
Commit
b7a8f31c
authored
Mar 13, 2012
by
Simon Marlow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
take the analyses out of the FuelUniqSM monad
parent
0dba52a5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
14 deletions
+10
-14
compiler/cmm/CmmBuildInfoTables.hs
compiler/cmm/CmmBuildInfoTables.hs
+1
-1
compiler/cmm/CmmLive.hs
compiler/cmm/CmmLive.hs
+2
-2
compiler/cmm/CmmPipeline.hs
compiler/cmm/CmmPipeline.hs
+1
-1
compiler/cmm/CmmUtils.hs
compiler/cmm/CmmUtils.hs
+6
-10
No files found.
compiler/cmm/CmmBuildInfoTables.hs
View file @
b7a8f31c
...
...
@@ -107,7 +107,7 @@ cafTransfers platform = mkBTransfer3 first middle last
add
l
s
=
if
hasCAF
l
then
Set
.
insert
(
toClosureLbl
platform
l
)
s
else
s
cafAnal
::
Platform
->
CmmGraph
->
FuelUniqSM
CAFEnv
cafAnal
::
Platform
->
CmmGraph
->
CAFEnv
cafAnal
platform
g
=
dataflowAnalBwd
g
[]
$
analBwd
cafLattice
(
cafTransfers
platform
)
...
...
compiler/cmm/CmmLive.hs
View file @
b7a8f31c
...
...
@@ -44,9 +44,9 @@ type BlockEntryLiveness = BlockEnv CmmLive
-- | Calculated liveness info for a CmmGraph
-----------------------------------------------------------------------------
cmmLiveness
::
CmmGraph
->
FuelUniqSM
BlockEntryLiveness
cmmLiveness
::
CmmGraph
->
BlockEntryLiveness
cmmLiveness
graph
=
liftM
check
$
dataflowAnalBwd
graph
[]
$
analBwd
liveLattice
xferLive
check
$
dataflowAnalBwd
graph
[]
$
analBwd
liveLattice
xferLive
where
entry
=
g_entry
graph
check
facts
=
noLiveOnEntry
entry
(
expectJust
"check"
$
mapLookup
entry
facts
)
facts
...
...
compiler/cmm/CmmPipeline.hs
View file @
b7a8f31c
...
...
@@ -130,7 +130,7 @@ cpsTop hsc_env (CmmProc h@(TopInfo {stack_info=StackInfo {arg_space=entry_off}})
dumps
Opt_D_dump_cmmz_split
"Post splitting"
gs
------------- More CAFs ------------------------------
cafEnv
<-
{-# SCC "cafAnal" #-}
run
$
cafAnal
platform
g
let
cafEnv
=
{-# SCC "cafAnal" #-}
cafAnal
platform
g
let
localCAFs
=
catMaybes
$
map
(
localCAFInfo
platform
cafEnv
)
gs
mbpprTrace
"localCAFs"
(
pprPlatform
platform
localCAFs
)
$
return
()
...
...
compiler/cmm/CmmUtils.hs
View file @
b7a8f31c
...
...
@@ -477,11 +477,9 @@ dataflowPassFwd (CmmGraph {g_entry=entry, g_graph=graph}) facts fwd = do
dataflowAnalFwd
::
NonLocal
n
=>
GenCmmGraph
n
->
[(
BlockId
,
f
)]
->
FwdPass
FuelUniqSM
n
f
->
FuelUniqSM
(
BlockEnv
f
)
dataflowAnalFwd
(
CmmGraph
{
g_entry
=
entry
,
g_graph
=
graph
})
facts
fwd
=
do
-- (graph, facts, NothingO) <- analyzeAndRewriteFwd fwd (JustC [entry]) graph (mkFactBase (fp_lattice fwd) facts)
-- return facts
return
(
analyzeFwd
fwd
(
JustC
[
entry
])
graph
(
mkFactBase
(
fp_lattice
fwd
)
facts
))
->
BlockEnv
f
dataflowAnalFwd
(
CmmGraph
{
g_entry
=
entry
,
g_graph
=
graph
})
facts
fwd
=
analyzeFwd
fwd
(
JustC
[
entry
])
graph
(
mkFactBase
(
fp_lattice
fwd
)
facts
)
dataflowAnalFwdBlocks
::
NonLocal
n
=>
GenCmmGraph
n
->
[(
BlockId
,
f
)]
...
...
@@ -495,11 +493,9 @@ dataflowAnalFwdBlocks (CmmGraph {g_entry=entry, g_graph=graph}) facts fwd = do
dataflowAnalBwd
::
NonLocal
n
=>
GenCmmGraph
n
->
[(
BlockId
,
f
)]
->
BwdPass
FuelUniqSM
n
f
->
FuelUniqSM
(
BlockEnv
f
)
dataflowAnalBwd
(
CmmGraph
{
g_entry
=
entry
,
g_graph
=
graph
})
facts
bwd
=
do
-- (graph, facts, NothingO) <- analyzeAndRewriteBwd fwd (JustC [entry]) graph (mkFactBase (fp_lattice fwd) facts)
-- return facts
return
(
analyzeBwd
bwd
(
JustC
[
entry
])
graph
(
mkFactBase
(
bp_lattice
bwd
)
facts
))
->
BlockEnv
f
dataflowAnalBwd
(
CmmGraph
{
g_entry
=
entry
,
g_graph
=
graph
})
facts
bwd
=
analyzeBwd
bwd
(
JustC
[
entry
])
graph
(
mkFactBase
(
bp_lattice
bwd
)
facts
)
dataflowPassBwd
::
NonLocal
n
=>
GenCmmGraph
n
->
[(
BlockId
,
f
)]
...
...
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