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,260
Issues
4,260
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
401
Merge Requests
401
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
1cea9a51
Commit
1cea9a51
authored
Jul 19, 2012
by
Simon Marlow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimise away some unnecessary stack checks
parent
f1ed6a10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
compiler/cmm/CmmLayoutStack.hs
compiler/cmm/CmmLayoutStack.hs
+19
-1
No files found.
compiler/cmm/CmmLayoutStack.hs
View file @
1cea9a51
...
...
@@ -211,11 +211,29 @@ layout procpoints liveness entry entry_args final_stackmaps final_hwm blocks
acc_stackmaps'
=
mapUnion
acc_stackmaps
out
hwm'
=
maximum
(
acc_hwm
:
(
sp0
-
sp_off
)
:
map
sm_sp
(
mapElems
out
))
-- If this block jumps to the GC, then we do not take its
-- stack usage into account for the high-water mark.
-- Otherwise, if the only stack usage is in the stack-check
-- failure block itself, we will do a redundant stack
-- check. The stack has a buffer designed to accommodate
-- the largest amount of stack needed for calling the GC.
--
this_sp_hwm
|
isGcJump
last0
=
0
|
otherwise
=
sp0
-
sp_off
hwm'
=
maximum
(
acc_hwm
:
this_sp_hwm
:
map
sm_sp
(
mapElems
out
))
go
bs
acc_stackmaps'
hwm'
(
final_blocks
++
acc_blocks
)
-- -----------------------------------------------------------------------------
-- Not foolproof, but GCFun is the culprit we most want to catch
isGcJump
::
CmmNode
O
C
->
Bool
isGcJump
(
CmmCall
{
cml_target
=
CmmReg
(
CmmGlobal
l
)
})
=
l
==
GCFun
||
l
==
GCEnter1
isGcJump
_something_else
=
False
-- -----------------------------------------------------------------------------
-- This doesn't seem right somehow. We need to find out whether this
...
...
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