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

wip: hir refactoring #332

Draft
wants to merge 31 commits into
base: next
Choose a base branch
from
Draft

wip: hir refactoring #332

wants to merge 31 commits into from

Commits on Sep 16, 2024

  1. wip: ir redesign

    bitwalker committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    1051624 View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2024

  1. Configuration menu
    Copy the full SHA
    117dfcf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3e48bb1 View commit details
    Browse the repository at this point in the history

Commits on Sep 20, 2024

  1. Configuration menu
    Copy the full SHA
    b8ee446 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2024

  1. Configuration menu
    Copy the full SHA
    db1aca0 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2024

  1. Configuration menu
    Copy the full SHA
    0057afc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    95379c6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1146d98 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7e37cf1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    03cb6f5 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0800423 View commit details
    Browse the repository at this point in the history
  7. wip: improve ergonomics of entity refs, implement support for generic…

    … grouped entity storage
    bitwalker committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    5ad94ac View commit details
    Browse the repository at this point in the history
  8. wip: implement key infrastructure for operations, patterns, builders

    This commit moves away from `derive!` for operation definitions, to the
    new `#[operation]` macro, and implements a number of
    changes/improvements to the `Operation` type and its related APIs.
    
    In particular with this commit, the builder infrastructure for
    operations was finalized and started to be tested with "real" ops.
    Validation was further improved by typing operands with type constraints
    that are validated when an op is verified. The handling of successors,
    operands, and results was improved and unified around a shared
    abstraction.
    
    The pattern and pattern rewriter infrastructure was sketched out as
    well, and I anticipate landing those next, along with tests for all of
    it.
    
    Once patterns are done, the next two items of note are the data analysis
    framework, and the conversion framework. With those done, we're ready to
    move to the new IR.
    bitwalker committed Oct 4, 2024
    Configuration menu
    Copy the full SHA
    9238669 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2024

  1. Configuration menu
    Copy the full SHA
    edf8a04 View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2024

  1. Configuration menu
    Copy the full SHA
    e839791 View commit details
    Browse the repository at this point in the history

Commits on Oct 20, 2024

  1. chore: add some useful deps

    bitwalker committed Oct 20, 2024
    Configuration menu
    Copy the full SHA
    07cf501 View commit details
    Browse the repository at this point in the history
  2. wip: promote attributes to top level, add ability to clone and hash t…

    …ype-erased attribute values
    bitwalker committed Oct 20, 2024
    Configuration menu
    Copy the full SHA
    c56be9b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    54ccab6 View commit details
    Browse the repository at this point in the history
  4. wip: implement region/non-region branch op interfaces, region simplif…

    …ication, rework visitors, and implement low-level pattern matchers
    bitwalker committed Oct 20, 2024
    Configuration menu
    Copy the full SHA
    de12ced View commit details
    Browse the repository at this point in the history
  5. wip: implement op folder

    bitwalker committed Oct 20, 2024
    Configuration menu
    Copy the full SHA
    72c4f12 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b69c4ec View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    05e1100 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f7aedcb View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2024

  1. Configuration menu
    Copy the full SHA
    05c3036 View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2024

  1. Configuration menu
    Copy the full SHA
    9c86f86 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f7f89f4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0aa10e5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8c32fc6 View commit details
    Browse the repository at this point in the history
  5. feat: implement cfg abstractions and utilities

    This commit adds the following useful tools (used in later commits):
    
    * The `Graph` trait for abstracting over flow graphs
    * The `GraphVisitor` and `DfsVisitor` primitives for performing and
      hooking into depth-first traversals of a `Graph` in either pre-order
      or post-order, or both.
    * Type aliases for pre- and post-order dfs visitors for blocks
    * The `GraphDiff` trait and `CfgDiff` data structure for representing
      pending insertions/deletions in a flow graph. This enables incremental
      updating of flow graph dependent analyses such as the dominator tree.
    bitwalker committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    3ffd2c4 View commit details
    Browse the repository at this point in the history
  6. feat: implement dominator and post-dominator analyses

    This introduces the incrementally updateable dominator and
    post-dominator analyses from LLVM, based on the Semi-NCA algorithm. This
    enables us to keep the (post-)dominator tree analysis up to date during
    rewriting of the IR, without needing to recompute it from scratch each
    time.
    
    This is an initial port of the original C++ code, modified to be more
    Rust-like, while still remaining quite close to the original. This could
    be easily cleaned up/rewritten in the future to be more idiomatic Rust,
    but for now it should suffice.
    bitwalker committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    64a0be3 View commit details
    Browse the repository at this point in the history
  7. feat: implement loop analysis

    This commit implements the generic loop analysis from LLVM, in Rust. It
    is a more sophisticated analysis than the one in HIR1, and provides us
    with some additional useful information that will come in handy during
    certain transformations to MASM.
    
    See the "Loop Terminlogy" document on llvm.org for details on how LLVM
    reasons about loops, which corresponds to the analysis above.
    bitwalker committed Oct 28, 2024
    Configuration menu
    Copy the full SHA
    9e9dfe8 View commit details
    Browse the repository at this point in the history