[GHC] #16064: Improving Placement of Heap Checks - Avoiding Slowdowns in Hot Code
GHC
ghc-devs at haskell.org
Tue Dec 18 15:40:04 UTC 2018
#16064: Improving Placement of Heap Checks - Avoiding Slowdowns in Hot Code
-------------------------------------+-------------------------------------
Reporter: _recursion | Owner: (none)
Type: task | Status: new
Priority: normal | Milestone: 8.9
Component: Compiler | Version:
Keywords: CodeGen, | Operating System: Unknown/Multiple
Performance |
Architecture: | Type of failure: Runtime
Unknown/Multiple | performance bug
Test Case: | Blocked By:
Blocking: | Related Tickets: #16040, #14791,
| #8326, #12231, #1498
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
When generating both heap and stack checks in Cmm, GHC can sometimes be
fairly obtuse about their placement. As a result, they can be generated
for paths in hot code that actually do not perform any allocation.
Examples can be found in the related tickets, particularly #14791 and
#16040.
This ticket exists to track the work
[https://ghc.haskell.org/trac/ghc/ticket/16040#comment:5 proposed] by
Simon to detect such code patterns. They are described as follows:
1. A primitive case with no allocation upstream from it.
2. One alternative that performs no allocation.
Under such circumstances the stack/heap checks can be moved from being
performed on every iteration to being performed just prior to the
allocation itself.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16064>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list