Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
a2e0fbe5
Commit
a2e0fbe5
authored
Jul 30, 2012
by
Simon Marlow
Browse files
bug fix for control-flow optimisation
parent
93883372
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/cmm/CmmContFlowOpt.hs
View file @
a2e0fbe5
...
@@ -33,9 +33,14 @@ cmmCfgOptsProc (CmmProc info lbl g) = CmmProc info' lbl g'
...
@@ -33,9 +33,14 @@ cmmCfgOptsProc (CmmProc info lbl g) = CmmProc info' lbl g'
info'
=
info
{
info_tbls
=
new_info_tbls
}
info'
=
info
{
info_tbls
=
new_info_tbls
}
new_info_tbls
=
mapFromList
(
map
upd_info
(
mapToList
(
info_tbls
info
)))
new_info_tbls
=
mapFromList
(
map
upd_info
(
mapToList
(
info_tbls
info
)))
-- If we changed any labels, then we have to update the info tables
-- too, except for the top-level info table because that might be
-- referred to by other procs.
upd_info
(
k
,
info
)
upd_info
(
k
,
info
)
|
Just
k'
<-
mapLookup
k
env
|
Just
k'
<-
mapLookup
k
env
=
(
k'
,
info
{
cit_lbl
=
infoTblLbl
k'
})
=
(
k'
,
if
k'
==
g_entry
g'
then
info
else
info
{
cit_lbl
=
infoTblLbl
k'
})
|
otherwise
|
otherwise
=
(
k
,
info
)
=
(
k
,
info
)
...
...
Write
Preview
Supports
Markdown
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