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,272
Issues
4,272
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
413
Merge Requests
413
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
daa2d5e3
Commit
daa2d5e3
authored
Mar 15, 2012
by
Simon Marlow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a bit more UNPACKing
parent
bb7d711c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
compiler/cmm/CmmExpr.hs
compiler/cmm/CmmExpr.hs
+5
-4
compiler/cmm/CmmNode.hs
compiler/cmm/CmmNode.hs
+7
-4
No files found.
compiler/cmm/CmmExpr.hs
View file @
daa2d5e3
...
...
@@ -43,10 +43,11 @@ import qualified Data.Set as Set
data
CmmExpr
=
CmmLit
CmmLit
-- Literal
|
CmmLoad
!
CmmExpr
!
CmmType
-- Read memory location
|
CmmLoad
!
CmmExpr
!
CmmType
-- Read memory location
|
CmmReg
!
CmmReg
-- Contents of register
|
CmmMachOp
MachOp
[
CmmExpr
]
-- Machine operation (+, -, *, etc.)
|
CmmStackSlot
Area
Int
-- addressing expression of a stack slot
|
CmmStackSlot
Area
{-# UNPACK #-}
!
Int
-- addressing expression of a stack slot
|
CmmRegOff
!
CmmReg
Int
-- CmmRegOff reg i
-- ** is shorthand only, meaning **
...
...
@@ -71,7 +72,7 @@ data CmmReg
-- or the stack space where function arguments and results are passed.
data
Area
=
Old
-- See Note [Old Area]
|
Young
BlockId
-- Invariant: must be a continuation BlockId
|
Young
{-# UNPACK #-}
!
BlockId
-- Invariant: must be a continuation BlockId
-- See Note [Continuation BlockId] in CmmNode.
deriving
(
Eq
,
Ord
)
...
...
@@ -111,7 +112,7 @@ data CmmLit
-- position-independent code.
|
CmmLabelDiffOff
CLabel
CLabel
Int
-- label1 - label2 + offset
|
CmmBlock
BlockId
-- Code label
|
CmmBlock
{-# UNPACK #-}
!
BlockId
-- Code label
-- Invariant: must be a continuation BlockId
-- See Note [Continuation BlockId] in CmmNode.
...
...
compiler/cmm/CmmNode.hs
View file @
daa2d5e3
...
...
@@ -35,8 +35,10 @@ import Prelude hiding (succ)
------------------------
-- CmmNode
#
define
ULabel
{-# UNPACK #-}
!
Label
data
CmmNode
e
x
where
CmmEntry
::
{-# UNPACK #-}
!
Label
->
CmmNode
C
O
CmmEntry
::
U
Label
->
CmmNode
C
O
CmmComment
::
FastString
->
CmmNode
O
O
...
...
@@ -60,11 +62,12 @@ data CmmNode e x where
-- bug for what can be put in arguments, see
-- Note [Register Parameter Passing]
CmmBranch
::
Label
->
CmmNode
O
C
-- Goto another block in the same procedure
CmmBranch
::
ULabel
->
CmmNode
O
C
-- Goto another block in the same procedure
CmmCondBranch
::
{
-- conditional branch
cml_pred
::
CmmExpr
,
cml_true
,
cml_false
::
Label
cml_true
,
cml_false
::
U
Label
}
->
CmmNode
O
C
CmmSwitch
::
CmmExpr
->
[
Maybe
Label
]
->
CmmNode
O
C
-- Table branch
...
...
@@ -122,7 +125,7 @@ data CmmNode e x where
tgt
::
ForeignTarget
,
-- call target and convention
res
::
[
CmmFormal
],
-- zero or more results
args
::
[
CmmActual
],
-- zero or more arguments; see Note [Register parameter passing]
succ
::
Label
,
-- Label of continuation
succ
::
ULabel
,
-- Label of continuation
updfr
::
UpdFrameOffset
,
-- where the update frame is (for building infotable)
intrbl
::
Bool
-- whether or not the call is interruptible
}
->
CmmNode
O
C
...
...
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