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

feat: implement stage 1 (hir) infra #3

Merged
merged 1 commit into from Apr 12, 2023
Merged

feat: implement stage 1 (hir) infra #3

merged 1 commit into from Apr 12, 2023

Conversation

bitwalker
Copy link
Contributor

The stage 1 IR (or HIR), is a sea-of-nodes style, SSA form intermediate representation. It is intended to be a target from higher level languages, so it supports a wider array of operations and control flow than is supported in MASM (and in the stage 2 IR), but provides a useful foundation on which to perform the necessary analyses and transformations in order to lower to MASM.

This commit introduces the basic infrastructure for the IR, namely the minimum data structures necessary to represent functions in the IR, which are composed of blocks containing one or more instructions in a specific order. The set of instructions defined is based on what is provided in MASM, as well as what is needed to represent programs written in Sway or Move (barring some features which we can not yet support in Miden).

Follow on commits will flesh out the IR builder, introduce modules, provide textual output for debugging, and implement control flow and dominator tree analyses.

The stage 1 IR (or HIR), is a sea-of-nodes style, SSA form intermediate
representation. It is intended to be a target from higher level
languages, so it supports a wider array of operations and control flow
than is supported in MASM (and in the stage 2 IR), but
provides a useful foundation on which to perform the necessary analyses
and transformations in order to lower to MASM.

This commit introduces the basic infrastructure for the IR, namely the
minimum data structures necessary to represent functions in the IR,
which are composed of blocks containing one or more instructions in a
specific order. The set of instructions defined is based on what is
provided in MASM, as well as what is needed to represent programs
written in Sway or Move (barring some features which we can not yet
support in Miden).

Follow on commits will flesh out the IR builder, introduce modules, provide
textual output for debugging, and implement control flow and dominator
tree analyses.
@bitwalker bitwalker self-assigned this Mar 31, 2023
@bitwalker bitwalker merged commit 42fcd2c into main Apr 12, 2023
2 checks passed
@bitwalker bitwalker deleted the bitwalker/hir branch April 12, 2023 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant