Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,869
    • Issues 4,869
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 453
    • Merge requests 453
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #20261
Closed
Open
Created Aug 21, 2021 by Zachary Snow@zachjs

Add regression test for renamer/typechecker performance regression in GHC 9

For a particular source file using the Happy parser generator, I have encountered a surprising compilation performance regression while preparing for an upgrade to GHC 9. Based on the output using -dshow-passes, the slowdown appears under the renamer/typechecker phase. On my machine, that phase takes just over 2 seconds using GHC 8.10.4, and over 3 minutes using GHC 9.0.1. Nothing jumped out at me in the migration guide that suggests a likely cause or possible solution.

!!! Renamer/typechecker [Language.SystemVerilog.Parser.Parse]: finished in 2034.57 milliseconds, allocated 1692.102 megabytes
!!! Renamer/typechecker [Language.SystemVerilog.Parser.Parse]: finished in 170922.65 milliseconds, allocated 448529.159 megabytes

The source file can be found at: https://github.com/zachjs/sv2v/blob/master/src/Language/SystemVerilog/Parser/Parse.y. I use Stack to manage my dependencies. The GHC 8.10.4 results can be replicated by building the repo's HEAD. Changing the Stack resolver to, e.g., nightly-2021-08-20 can be used to replicate the GHC 9.0.1 results.

I have plenty of free cycles to try to further isolate this. Any suggestions on next steps would be greatly appreciated!

Edited Aug 25, 2021 by Zubin
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking