Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
    • Insights
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
    • Locked Files
  • Issues 3,609
    • Issues 3,609
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 201
    • Merge Requests 201
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Security & Compliance
    • Security & Compliance
    • Dependency List
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #16064

Closed
Open
Opened Dec 18, 2018 by Ara Adkins@iamrecursion
  • Report abuse
  • New issue
Report abuse New issue

Improving Placement of Heap Checks - Avoiding Slowdowns in Hot Code

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 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.

Trac metadata
Trac field Value
Version
Type Task
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC simonpj
Operating system
Architecture

Related issues

  • Discussion
  • Designs
Assignee
Assign to
8.9
Milestone
8.9
Assign milestone
Time tracking
None
Due date
None
5
Labels
code generation P::normal runtime perf task Trac import
Assign labels
  • View project labels
Reference: ghc/ghc#16064