Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • M mu-impl-fast
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 40
    • Issues 40
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • mumu
  • mu-impl-fast
  • Issues
  • #8
Closed
Open
Issue created Nov 11, 2016 by Yi Lin@u4776528Owner

IR validation pass

Currently if the input IR is incorrect, one of the following may happen:

  1. some assertion in the compiler may fail
  2. Rust safety finds it and panics (such as index out of bounds)
  3. the compiler generates correct or incorrect code even if input IR is incorrect

We will want a IR validation pass to check the input IR. It includes:

  • check if types and numbers of operands and results of each instructions match
  • check if function signatures matches parameters and return values
  • check if branch arguments matches parameters, and if branch destination is valid
  • check if the last instruction for each block is terminating instruction (BRNACH, CALL, RET, etc) ...

(this list will grow when I think up more)

Assignee
Assign to
Time tracking