Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,269
    • Issues 4,269
    • 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
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Wiki
    • Commentary
    • Compiler
    • New code gen
  • cleanup

Last edited by Sylvain Henry May 26, 2020
Page history New page

cleanup

Historical page

This page is a bunch of notes on the new code generator. It is outdated and is here only for historical reasons.It should probably be removed. See Code Generator page for a description of current code generator.

Cleanup after the new codegen is enabled

The new codegen was enabled by default in 832077ca5393d298324cb6b0a2cb501e27209768. Now that the switch has been made, we can remove all the cruft associated with the old code generator. There are dependencies between some of the components, so we have to do things in the right order. Here is a list of the cleanup tasks, and notes about dependencies:

Independent tasks

  • Use BlockId or Label consistently, currently we use a mixture of the two. Maybe get rid of the BlockId module.

  • Remove live-var and CAF lists from StgSyn, and then clean up CoreToStg

  • Fix the layering: GHC.Cmm.* modules should not depend on GHC.StgToCmm.*

Towards removing OldCmm

  • IN PROGRESS (Simon M): Change the NCG over to consume new Cmm. We possibly also want the generated native code to use the Hoopl Block representation, although that will mean changing branch instructions to have both true and false targets, rather than true and fallthrough as we have now.

  • Remove cmm/CmmCvt (this will save some compile-time too)

  • Remove cmm/OldCmm*, cmm/PprOldCmm etc.

Later

  • Do the new SRT story (ToDo: write a wiki page about this)
Clone repository

GHC Home
GHC User's Guide

Joining In

Newcomers info
Mailing Lists & IRC
The GHC Team

Documentation

GHC Status Info
Working conventions
Building Guide
Debugging
Commentary

Wiki

Title Index
Recent Changes