Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Glasgow Haskell Compiler
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
526cbc7a
Commit
526cbc7a
authored
Feb 03, 2014
by
Jan Stolarek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document deprecations in Hoopl
parent
5f64b2c6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
2 deletions
+30
-2
compiler/cmm/CmmBuildInfoTables.hs
compiler/cmm/CmmBuildInfoTables.hs
+1
-1
compiler/cmm/CmmLive.hs
compiler/cmm/CmmLive.hs
+1
-0
compiler/cmm/Hoopl.hs
compiler/cmm/Hoopl.hs
+28
-1
No files found.
compiler/cmm/CmmBuildInfoTables.hs
View file @
526cbc7a
{-# LANGUAGE GADTs #-}
--
Todo: remove -fno-warn-warnings-deprecations
--
See Note [Deprecations in Hoopl] in Hoopl module
{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}
module
CmmBuildInfoTables
(
CAFSet
,
CAFEnv
,
cafAnal
...
...
compiler/cmm/CmmLive.hs
View file @
526cbc7a
...
...
@@ -2,6 +2,7 @@
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- See Note [Deprecations in Hoopl] in Hoopl module
{-# OPTIONS_GHC -fno-warn-warnings-deprecations #-}
module
CmmLive
...
...
compiler/cmm/Hoopl.hs
View file @
526cbc7a
...
...
@@ -36,7 +36,7 @@ deepFwdRw f = deepFwdRw3 f f f
-- But rw and rw' are single functions.
thenFwdRw
::
forall
n
f
.
FwdRewrite
UniqSM
n
f
->
FwdRewrite
UniqSM
n
f
->
FwdRewrite
UniqSM
n
f
->
FwdRewrite
UniqSM
n
f
thenFwdRw
rw3
rw3'
=
wrapFR2
thenrw
rw3
rw3'
where
...
...
@@ -124,3 +124,30 @@ badd_rw :: BwdRewrite UniqSM n f
->
(
Graph
n
e
x
,
BwdRewrite
UniqSM
n
f
)
->
(
Graph
n
e
x
,
BwdRewrite
UniqSM
n
f
)
badd_rw
rw2
(
g
,
rw1
)
=
(
g
,
rw1
`
thenBwdRw
`
rw2
)
-- Note [Deprecations in Hoopl]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
-- CmmLive and CmmBuildInfoTables modules enable -fno-warn-warnings-deprecations
-- flag because they import deprecated functions from Hoopl. I spent some time
-- trying to figure out what is going on, so here's a brief explanation. The
-- culprit is the joinOutFacts function, which should be replaced with
-- joinFacts. The difference between them is that the latter one needs extra
-- Label parameter. Labels identify blocks and are used in the fact base to
-- assign facts to a block (in case you're wondering, Label is an Int wrapped in
-- a newtype). Lattice join function is also required to accept a Label but the
-- only reason why it is so are the debugging purposes: see joinInFacts function
-- which is a no-op and is run only because join function might produce
-- debugging output. Now, going back to the Cmm modules. The "problem" with the
-- deprecated joinOutFacts function is that it passes wrong label when calling
-- lattice join function: instead of label of a block for which we are joining
-- facts it uses labels of successors of that block. So the joinFacts function
-- expects to be given a label of a block for which we are joining facts. I
-- don't see an obvious way of recovering that Label at the call sites of
-- joinOutFacts (if that was easily done then joinFacts function could do it
-- internally without requiring label as a parameter). A cheap way of
-- eliminating these warnings would be to create a bogus Label, since none of
-- our join functions is actually using the Label parameter. But that doesn't
-- feel right. I think the real solution here is to fix Hoopl API, which is
-- already broken in several ways. See Hoopl/Cleanup page on the wiki for more
-- notes on improving Hoopl.
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