Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,313
Issues
4,313
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
385
Merge Requests
385
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
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
Glasgow Haskell Compiler
GHC
Commits
76b93dcb
Commit
76b93dcb
authored
Jul 29, 2011
by
batterseapower
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove last use of entryLblToInfoLbl
parent
24692275
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
19 deletions
+12
-19
compiler/cmm/CLabel.hs
compiler/cmm/CLabel.hs
+2
-13
compiler/cmm/CmmProcPoint.hs
compiler/cmm/CmmProcPoint.hs
+10
-6
No files found.
compiler/cmm/CLabel.hs
View file @
76b93dcb
...
...
@@ -100,7 +100,7 @@ module CLabel (
mkHpcTicksLabel
,
hasCAF
,
entryLblToInfoLbl
,
cvtToClosureLbl
,
cvtToClosureLbl
,
needsCDecl
,
isAsmTemp
,
maybeAsmTemp
,
externallyVisibleCLabel
,
isMathFun
,
isCFunctionLabel
,
isGcPtrLabel
,
labelDynamic
,
...
...
@@ -500,18 +500,7 @@ mkPlainModuleInitLabel :: Module -> CLabel
mkPlainModuleInitLabel
mod
=
PlainModuleInitLabel
mod
-- -----------------------------------------------------------------------------
-- Converting between info labels and entry/ret labels.
entryLblToInfoLbl
::
CLabel
->
CLabel
entryLblToInfoLbl
(
IdLabel
n
c
(
Entry
lcl
))
=
IdLabel
n
c
(
InfoTable
lcl
)
entryLblToInfoLbl
(
IdLabel
n
c
ConEntry
)
=
IdLabel
n
c
ConInfoTable
entryLblToInfoLbl
(
IdLabel
n
c
StaticConEntry
)
=
IdLabel
n
c
StaticInfoTable
entryLblToInfoLbl
(
CaseLabel
n
CaseReturnPt
)
=
CaseLabel
n
CaseReturnInfo
entryLblToInfoLbl
(
CmmLabel
m
str
CmmEntry
)
=
CmmLabel
m
str
CmmInfo
entryLblToInfoLbl
(
CmmLabel
m
str
CmmRet
)
=
CmmLabel
m
str
CmmRetInfo
entryLblToInfoLbl
l
=
pprPanic
"CLabel.entryLblToInfoLbl"
(
pprCLabel
l
)
-- Brutal method of obtaining a closure label
cvtToClosureLbl
(
IdLabel
n
c
(
InfoTable
_
))
=
IdLabel
n
c
Closure
cvtToClosureLbl
(
IdLabel
n
c
(
Entry
_
))
=
IdLabel
n
c
Closure
...
...
compiler/cmm/CmmProcPoint.hs
View file @
76b93dcb
...
...
@@ -384,7 +384,8 @@ add_CopyOuts protos procPoints g = foldGraphBlocks mb_copy_out (return mapEmpty)
splitAtProcPoints
::
CLabel
->
ProcPointSet
->
ProcPointSet
->
BlockEnv
Status
->
CmmTop
->
FuelUniqSM
[
CmmTop
]
splitAtProcPoints
entry_label
callPPs
procPoints
procMap
(
CmmProc
(
TopInfo
{
info_tbl
=
info_tbl
,
stack_info
=
stack_info
})
(
CmmProc
(
TopInfo
{
info_tbl
=
info_tbl
,
stack_info
=
stack_info
})
top_l
g
@
(
CmmGraph
{
g_entry
=
entry
}))
=
do
-- Build a map from procpoints to the blocks they reach
let
addBlock
b
graphEnv
=
...
...
@@ -405,11 +406,14 @@ splitAtProcPoints entry_label callPPs procPoints procMap
-- * Labels for their new procedures
-- * Labels for the info tables of their new procedures (only if the proc point is a callPP)
-- Due to common blockification, we may overestimate the set of procpoints.
let
add_label
map
pp
=
return
$
Map
.
insert
pp
(
lbl
,
mb_info_lbl
)
map
where
lbl
=
if
pp
==
entry
then
entry_label
else
blockLbl
pp
mb_info_lbl
=
guard
(
setMember
id
callPPs
)
>>
Just
(
entryLblToInfoLbl
lbl
)
procLabels
<-
foldM
add_label
Map
.
empty
(
filter
(
flip
mapMember
(
toBlockMap
g
))
(
setElems
procPoints
))
let
add_label
map
pp
=
Map
.
insert
pp
lbls
map
where
lbls
|
pp
==
entry
=
(
entry_label
,
Just
entry_info_lbl
)
|
otherwise
=
(
blockLbl
pp
,
guard
(
setMember
pp
callPPs
)
>>
Just
(
infoTblLbl
pp
))
entry_info_lbl
=
case
info_tbl
of
CmmInfoTable
entry_info_label
_
_
_
_
->
entry_info_label
CmmNonInfoTable
->
pprPanic
"splitAtProcPoints: looked at info label for entry without info table"
(
ppr
pp
)
procLabels
=
foldl
add_label
Map
.
empty
(
filter
(
flip
mapMember
(
toBlockMap
g
))
(
setElems
procPoints
))
-- For each procpoint, we need to know the SP offset on entry.
-- If the procpoint is:
-- - continuation of a call, the SP offset is in the call
...
...
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