Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
M
mu-impl-fast
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 40
    • Issues 40
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • mu
  • mu-impl-fast
  • Issues
  • #8

Closed
Open
Opened Nov 11, 2016 by Yi Lin@u4776528
  • Report abuse
  • New issue
Report abuse New issue

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)

  • Discussion
  • Designs
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
1
Labels
enhancement
Assign labels
  • View project labels
Reference: mu/mu-impl-fast#8