Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate HIR in favor of AST-specific queries #237

Open
2 tasks
fabianschuiki opened this issue Jan 21, 2022 · 0 comments
Open
2 tasks

Eliminate HIR in favor of AST-specific queries #237

fabianschuiki opened this issue Jan 21, 2022 · 0 comments
Labels
A-hir Area: High-level Intermediate Representation. L-vlog Language: Verilog and SystemVerilog.

Comments

@fabianschuiki
Copy link
Owner

fabianschuiki commented Jan 21, 2022

HIR has been carried over from the early days of moore as a way to establish parent relationships and perform high-level analysis of AST nodes. Since AST nodes now properly carry their parent, the only remaining use case of the HIR is high-level analyses of AST nodes (like splitting pattern exprs into repeat patterns, positional patterns, etc.). These would be much better expressed as queries operating specifically on those AST nodes, and get rid of the HIR in the process.

The following HIR nodes and lowerings need to be dropped in favor of more specific queries:

  • Expressions
    • Patterns
    • Calls to builtin functions (e.g. $bits(...))
@fabianschuiki fabianschuiki added L-vlog Language: Verilog and SystemVerilog. A-hir Area: High-level Intermediate Representation. labels Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-hir Area: High-level Intermediate Representation. L-vlog Language: Verilog and SystemVerilog.
Projects
None yet
Development

No branches or pull requests

1 participant