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

git subtree hugr-llvm #1601

Draft
wants to merge 84 commits into
base: main
Choose a base branch
from
Draft

git subtree hugr-llvm #1601

wants to merge 84 commits into from

Commits on May 24, 2024

  1. init

    doug-q committed May 24, 2024
    Configuration menu
    Copy the full SHA
    a44f954 View commit details
    Browse the repository at this point in the history

Commits on May 29, 2024

  1. Configuration menu
    Copy the full SHA
    8e30350 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f85f2dd View commit details
    Browse the repository at this point in the history
  3. Expect right in void case

    mark-koch committed May 29, 2024
    Configuration menu
    Copy the full SHA
    554a0f6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cbc46ce View commit details
    Browse the repository at this point in the history

Commits on May 30, 2024

  1. Refactor inputs

    Co-authored-by: doug-q <141026920+doug-q@users.noreply.github.com>
    mark-koch and doug-q authored May 30, 2024
    Configuration menu
    Copy the full SHA
    dfa0b03 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #11 from mark-koch/feat/call

    feat: Emission for Call nodes
    doug-q authored May 30, 2024
    Configuration menu
    Copy the full SHA
    7609d88 View commit details
    Browse the repository at this point in the history

Commits on May 31, 2024

  1. fix: Syntax error

    croyzor committed May 31, 2024
    Configuration menu
    Copy the full SHA
    c3bb2bf View commit details
    Browse the repository at this point in the history
  2. Merge pull request #12 from croyzor/fix/typo

    fix: Syntax error
    doug-q authored May 31, 2024
    Configuration menu
    Copy the full SHA
    ef9d69c View commit details
    Browse the repository at this point in the history
  3. add CI

    doug-q committed May 31, 2024
    Configuration menu
    Copy the full SHA
    3a1fc7c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    bfd6b8e View commit details
    Browse the repository at this point in the history
  5. Merge pull request #15 from CQCL/doug/ci

    chore: Add issue-to-project.yml, enable coverage
    doug-q authored May 31, 2024
    Configuration menu
    Copy the full SHA
    5962217 View commit details
    Browse the repository at this point in the history
  6. ci: Fix change-filters

    They were pointing to an invalid source directory.
    aborgna-q authored May 31, 2024
    Configuration menu
    Copy the full SHA
    9249f22 View commit details
    Browse the repository at this point in the history
  7. Merge pull request #16 from CQCL/ab/fix-change-filters

    ci: Fix change-filters
    aborgna-q authored May 31, 2024
    Configuration menu
    Copy the full SHA
    c079b7f View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2024

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

Commits on Jun 14, 2024

  1. Merge pull request #18 from CQCL/doug/fix-sum-tag-elision

    fix: sum type tag elision logic reversed
    doug-q authored Jun 14, 2024
    Configuration menu
    Copy the full SHA
    b63c619 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    35785e5 View commit details
    Browse the repository at this point in the history
  3. Merge pull request #27 from CQCL/doug/tag-test

    test: add a test for sum type tags
    doug-q authored Jun 14, 2024
    Configuration menu
    Copy the full SHA
    4ae1b8a View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2024

  1. feat: Support values

    lmondada committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    66d456e View commit details
    Browse the repository at this point in the history
  2. Merge pull request #30 from CQCL/feat/func_type_ptr

    feat: Support `FunctionType` values
    lmondada authored Jun 17, 2024
    Configuration menu
    Copy the full SHA
    aac3bfe View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2024

  1. feat: add get_extern_func (#28)

    doug-q authored Jun 18, 2024
    Configuration menu
    Copy the full SHA
    2f64087 View commit details
    Browse the repository at this point in the history
  2. feat: lower CFGs (#26)

    doug-q authored Jun 18, 2024
    Configuration menu
    Copy the full SHA
    a87c3e2 View commit details
    Browse the repository at this point in the history
  3. feat: Add initial codegen extension for prelude (#29)

    Note that this extension is not intended to be complete, just enough to
    get started.
    
    We include some simplification of test infrastructure, although it is
    not strictly necessary. An earlier approach required these changes.
    doug-q authored Jun 18, 2024
    Configuration menu
    Copy the full SHA
    4b51a4c View commit details
    Browse the repository at this point in the history
  4. feat!: Namer optionally appends node index to mangled names. (#32)

    We take this opportunity to move some auxilliary code out of emit.rs,
    and to fix up some docs in fat.rs.
    
    BREAKING CHANGE: `Namer::new` takes an additional parameter.
    
    ---------
    
    Co-authored-by: Alec Edgington <54802828+cqc-alec@users.noreply.github.com>
    doug-q and cqc-alec authored Jun 18, 2024
    Configuration menu
    Copy the full SHA
    d10f6b8 View commit details
    Browse the repository at this point in the history
  5. docs: fix bad grammar (#34)

    doug-q authored Jun 18, 2024
    Configuration menu
    Copy the full SHA
    1f1c633 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2024

  1. Configuration menu
    Copy the full SHA
    8d86755 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fa37181 View commit details
    Browse the repository at this point in the history
  3. test: Add integration tests lowering guppy programs (#35)

    Co-authored-by: Mark Koch <48097969+mark-koch@users.noreply.github.com>
    doug-q and mark-koch authored Jun 20, 2024
    Configuration menu
    Copy the full SHA
    b63ba63 View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2024

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

Commits on Jun 24, 2024

  1. refactor: clean up fat.rs (#38)

    We take the opportunity to tidy up cfg.rs a bit.
    
    `impl Copy for FatNode` will now work, and many other methods now have
    more appropriate lifetime constraints. The borrow checker will thank
    you.
    
    We add `FatNode::try_new_hierarchy_view`.
    doug-q authored Jun 24, 2024
    Configuration menu
    Copy the full SHA
    1a2c642 View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2024

  1. ci: add CODEOWNERS (#41)

    will enable "require review from codeowners" after this
    ss2165 authored Jun 25, 2024
    Configuration menu
    Copy the full SHA
    3af3813 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2024

  1. ci: Add release-plz config (#44)

    Publishing to crates.io is disabled until the crate is released.
    
    Closes #43
    aborgna-q authored Jun 26, 2024
    Configuration menu
    Copy the full SHA
    8dcba0f View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2024

  1. fix!: Allow Const and FuncDecl as children of Modules, Dataflow Paren…

    …ts, and CFG nodes (#46)
    
    We take the opportunity to fix a bug where the promise to ignore
    duplicate calls to `emit_func` was not upheld, and to clean up the now
    unnecessary `Emission`.
    
    Fixes #4 , although we go further than required by this issue.
    
    BREAKING CHANGE: rename `emit_global` to `emit_func`. Replace `Emission`
    type with `FatNode<FuncDefn>`.
    doug-q authored Jul 1, 2024
    Configuration menu
    Copy the full SHA
    a35ae75 View commit details
    Browse the repository at this point in the history

Commits on Jul 2, 2024

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

Commits on Jul 10, 2024

  1. chore: prepare Cargo.toml, README.md, DEVELOPMENT.md ready for …

    …initial release (#48)
    
    closes #36
    
    ---------
    
    Co-authored-by: Alec Edgington <54802828+cqc-alec@users.noreply.github.com>
    doug-q and cqc-alec authored Jul 10, 2024
    Configuration menu
    Copy the full SHA
    ea6a69b View commit details
    Browse the repository at this point in the history
  2. chore: release v0.1.0 (#45)

    ## 🤖 New release
    * `hugr-llvm`: 0.1.0
    
    <details><summary><i><b>Changelog</b></i></summary><p>
    
    <blockquote>
    
    ## [0.1.0](https://github.com/CQCL/hugr-llvm/releases/tag/v0.1.0) -
    2024-07-10
    
    ### Bug Fixes
    - Syntax error
    - sum type tag elision logic reversed
    - [**breaking**] Allow Const and FuncDecl as children of Modules,
    Dataflow Parents, and CFG nodes
    ([#46](CQCL/hugr-llvm#46))
    
    ### Documentation
    - fix bad grammar ([#34](CQCL/hugr-llvm#34))
    
    ### New Features
    - Emission for Call nodes
    - Support  values
    - add `get_extern_func`
    ([#28](CQCL/hugr-llvm#28))
    - lower CFGs ([#26](CQCL/hugr-llvm#26))
    - Add initial codegen extension for `prelude`
    ([#29](CQCL/hugr-llvm#29))
    - [**breaking**] `Namer` optionally appends node index to mangled names.
    ([#32](CQCL/hugr-llvm#32))
    - Implement lowerings for ieq,ilt_s,sub in int codegen extension
    ([#33](CQCL/hugr-llvm#33))
    - Add initial `float` extension
    ([#31](CQCL/hugr-llvm#31))
    - Emit more int comparison operators
    ([#47](CQCL/hugr-llvm#47))
    
    ### Refactor
    - clean up fat.rs ([#38](CQCL/hugr-llvm#38))
    
    ### Testing
    - add a test for sum type tags
    - Add integration tests lowering guppy programs
    ([#35](CQCL/hugr-llvm#35))
    </blockquote>
    
    
    </p></details>
    
    ---
    This PR was generated with
    [release-plz](https://github.com/MarcoIeni/release-plz/).
    
    ---------
    
    Co-authored-by: Douglas Wilson <douglas.wilson@quantinuum.com>
    hugrbot and doug-q authored Jul 10, 2024
    Configuration menu
    Copy the full SHA
    d1ee81d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e55b0a7 View commit details
    Browse the repository at this point in the history

Commits on Jul 15, 2024

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

Commits on Jul 19, 2024

  1. refactor: use HugrFuncType/HugrType/HugrSumType (#56)

    This gives us a language to distinguish between Hugr Types and LLVM
    types. It will help with the coming hugr::types::FunctionType ->
    hugr::types::Signature change
    doug-q authored Jul 19, 2024
    Configuration menu
    Copy the full SHA
    eeb27ea View commit details
    Browse the repository at this point in the history

Commits on Jul 22, 2024

  1. chore!: bump to hugr-0.9.0 (#57)

    BREAKING CHANGE: hugr types in signatures have changed
    doug-q authored Jul 22, 2024
    Configuration menu
    Copy the full SHA
    2ee2849 View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2024

  1. Configuration menu
    Copy the full SHA
    5d7f339 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0c3c417 View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2024

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

Commits on Jul 29, 2024

  1. refactor!: add LLVMSumValue (#63)

    The payoff here is in the simplification of lowering of `CFG` and
    `Conditional`. By factoring out the destructuring logic, we will be able
    to reuse this in other places. In particular generating destructors.
    This has the unfortunate side-effect of changing the test case output.
    The price one pays for these golden tests.
    
    BREAKING CHANGE: some types in public interfaces have changed slightly,
    in particular variant tags are now consistently `usize`
    doug-q authored Jul 29, 2024
    Configuration menu
    Copy the full SHA
    6cc40d3 View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2024

  1. chore: upgrade to hugr-0.10.0 (#64)

    Note that due to circular dependencies, we are temporarily pinning to a
    guppy git commit
    doug-q authored Jul 31, 2024
    Configuration menu
    Copy the full SHA
    7c087e5 View commit details
    Browse the repository at this point in the history
  2. chore: release v0.2.0 (#58)

    ## 🤖 New release
    * `hugr-llvm`: 0.1.0 -> 0.2.0
    
    <details><summary><i><b>Changelog</b></i></summary><p>
    
    <blockquote>
    
    ## [0.2.0](CQCL/hugr-llvm@v0.1.0...v0.2.0) -
    2024-07-31
    
    ### New Features
    - make EmitFuncContext::iw_context pub
    ([#55](CQCL/hugr-llvm#55))
    
    ### Refactor
    - use HugrFuncType/HugrType/HugrSumType
    ([#56](CQCL/hugr-llvm#56))
    - remove unneeded `HugrView` constraints
    ([#59](CQCL/hugr-llvm#59))
    - [**breaking**] add `LLVMSumValue`
    ([#63](CQCL/hugr-llvm#63))
    
    ### Testing
    - Add test for LoadFunction Op
    ([#60](CQCL/hugr-llvm#60))
    </blockquote>
    
    
    </p></details>
    
    ---
    This PR was generated with
    [release-plz](https://github.com/MarcoIeni/release-plz/).
    
    ---------
    
    Co-authored-by: Douglas Wilson <douglas.wilson@quantinuum.com>
    hugrbot and doug-q authored Jul 31, 2024
    Configuration menu
    Copy the full SHA
    f0ce26a View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2024

  1. feat: Add lowering for LoadFunction (#65)

    add load function to llvm generation
    
    solves CQCL/hugr-llvm#9
    cqc-melf authored Aug 1, 2024
    Configuration menu
    Copy the full SHA
    3755ce3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ec53ba3 View commit details
    Browse the repository at this point in the history
  3. docs: Remove fixed crate version in usage instructions (#68)

    Fixed versions tend to get stale (it already happened here), and in
    general is easier to call `cargo add` rather than modify the toml by
    hand.
    aborgna-q authored Aug 1, 2024
    Configuration menu
    Copy the full SHA
    add3e71 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2024

  1. ci: Ensure release-plz always pushes as @hugrbot (#71)

    This should solve the issue where CI checks wouldn't run in release PRs
    unless a human triggered an update.
    
    See
    https://github.com/MarcoIeni/release-plz/blob/main/website/docs/github/token.md#use-a-personal-access-token
    aborgna-q authored Aug 16, 2024
    Configuration menu
    Copy the full SHA
    6d1d546 View commit details
    Browse the repository at this point in the history
  2. ci: Use hugrverse reusable actions (#72)

    Replaces the local definitions with
    [hugrverse-action](https://github.com/CQCL/hugrverse-actions)'s.
    aborgna-q authored Aug 16, 2024
    Configuration menu
    Copy the full SHA
    21b6105 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    042ad5d View commit details
    Browse the repository at this point in the history
  4. ci: Use hugrverse-actions add-to-project workflow (#74)

    The main change here is changing the github token to a fine-grained one
    with access to the other organization's project.
    aborgna-q authored Aug 16, 2024
    Configuration menu
    Copy the full SHA
    d9e7e59 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2024

  1. chore: Upgrade to hugr 0.11 (#76)

    Closes #75
    croyzor authored Aug 19, 2024
    Configuration menu
    Copy the full SHA
    43739f1 View commit details
    Browse the repository at this point in the history
  2. chore: release v0.2.1 (#77)

    ## 🤖 New release
    * `hugr-llvm`: 0.2.0 -> 0.2.1
    
    <details><summary><i><b>Changelog</b></i></summary><p>
    
    <blockquote>
    
    ## [0.2.1](CQCL/hugr-llvm@v0.2.0...v0.2.1) -
    2024-08-19
    
    ### Documentation
    - Remove fixed crate version in usage instructions
    ([#68](CQCL/hugr-llvm#68))
    
    ### New Features
    - Add lowering for LoadFunction
    ([#65](CQCL/hugr-llvm#65))
    - Emission for CallIndirect nodes
    ([#73](CQCL/hugr-llvm#73))
    </blockquote>
    
    
    </p></details>
    
    ---
    This PR was generated with
    [release-plz](https://github.com/MarcoIeni/release-plz/).
    hugrbot authored Aug 19, 2024
    Configuration menu
    Copy the full SHA
    ef6e337 View commit details
    Browse the repository at this point in the history

Commits on Aug 20, 2024

  1. feat!: Lower string, print, and panic (#78)

    Closes #79.
    
    Adds lowering logic for:
    * String type and `ConstString` (c-style)
    * Error type and `ConstError`
    * Print op (lowers to libc `printf` by default)
    * Panic op (lowers to libc `abort` by default)
    
    BREAKING CHANGE: `CodegenExtension::emitter` has a new lifetime bound on
    the `self` argument. `PreludeCodegen` trait now requires `Clone`.
    mark-koch authored Aug 20, 2024
    Configuration menu
    Copy the full SHA
    97ee196 View commit details
    Browse the repository at this point in the history

Commits on Aug 21, 2024

  1. feat: Lower float operations (#83)

    Closes #21.
    
    There are still some missing operations that should be supported by
    llvm, but are not binded by inkwell :/
    
    I modified the `check_emissions!` macro to work inside rstest's
    `#[case]`s
    aborgna-q authored Aug 21, 2024
    Configuration menu
    Copy the full SHA
    24bd878 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2024

  1. feat: Lower logic extension (#81)

    Closes #23
    mark-koch authored Aug 27, 2024
    Configuration menu
    Copy the full SHA
    aec5cfc View commit details
    Browse the repository at this point in the history
  2. feat: Lower arrays (#82)

    Closes #24
    mark-koch authored Aug 27, 2024
    Configuration menu
    Copy the full SHA
    f6db62c View commit details
    Browse the repository at this point in the history
  3. chore: release v0.3.0 (#80)

    ## 🤖 New release
    * `hugr-llvm`: 0.2.1 -> 0.3.0
    
    <details><summary><i><b>Changelog</b></i></summary><p>
    
    <blockquote>
    
    ## [0.3.0](CQCL/hugr-llvm@v0.2.1...v0.3.0) -
    2024-08-27
    
    ### New Features
    - [**breaking**] Lower string, print, and panic
    ([#78](CQCL/hugr-llvm#78))
    - Lower float operations
    ([#83](CQCL/hugr-llvm#83))
    - Lower logic extension
    ([#81](CQCL/hugr-llvm#81))
    - Lower arrays ([#82](CQCL/hugr-llvm#82))
    </blockquote>
    
    
    </p></details>
    
    ---
    This PR was generated with
    [release-plz](https://github.com/MarcoIeni/release-plz/).
    hugrbot authored Aug 27, 2024
    Configuration menu
    Copy the full SHA
    ef67c1a View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2024

  1. feat: Emit more int operations (#87)

    Add emission for multiplication, division, remainder and negation ops
    
    Closes #20
    
    ---------
    
    Co-authored-by: Agustín Borgna <121866228+aborgna-q@users.noreply.github.com>
    croyzor and aborgna-q authored Aug 28, 2024
    Configuration menu
    Copy the full SHA
    7245ca9 View commit details
    Browse the repository at this point in the history
  2. chore: release v0.3.1 (#88)

    ## 🤖 New release
    * `hugr-llvm`: 0.3.0 -> 0.3.1
    
    <details><summary><i><b>Changelog</b></i></summary><p>
    
    <blockquote>
    
    ## [0.3.1](CQCL/hugr-llvm@v0.3.0...v0.3.1) -
    2024-08-28
    
    ### New Features
    - Emit more int operations
    ([#87](CQCL/hugr-llvm#87))
    </blockquote>
    
    
    </p></details>
    
    ---
    This PR was generated with
    [release-plz](https://github.com/MarcoIeni/release-plz/).
    hugrbot authored Aug 28, 2024
    Configuration menu
    Copy the full SHA
    dd99107 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2024

  1. chore!: bump hugr to 0.12.0 (#90)

    We ignore the guppy tests as guppy has not yet been updated for the new
    hugr version.
    
    BREAKING CHANGE: Require `hugr-0.12.0`
    doug-q authored Sep 2, 2024
    Configuration menu
    Copy the full SHA
    2acb378 View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2024

  1. chore: release v0.4.0 (#92)

    ## 🤖 New release
    * `hugr-llvm`: 0.3.1 -> 0.4.0
    
    <details><summary><i><b>Changelog</b></i></summary><p>
    
    <blockquote>
    
    ## [0.3.1](CQCL/hugr-llvm@v0.3.0...v0.3.1) -
    2024-08-28
    
    ### New Features
    - Emit more int operations
    ([#87](CQCL/hugr-llvm#87))
    </blockquote>
    
    
    </p></details>
    
    ---
    This PR was generated with
    [release-plz](https://github.com/MarcoIeni/release-plz/).
    hugrbot authored Sep 3, 2024
    Configuration menu
    Copy the full SHA
    6929fa2 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2024

  1. test: Add execution test framework (#97)

    Co-authored-by: Alec Edgington <54802828+cqc-alec@users.noreply.github.com>
    doug-q and cqc-alec authored Sep 9, 2024
    Configuration menu
    Copy the full SHA
    aba5bd0 View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2024

  1. feat: Add emitters for int <-> float/usize conversions (#94)

    Work towards #22, but since we updated to hugr 0.12.0 there are more
    operations in `arithmetic.conversions`. I'll implement those in a
    separate PR.
    
    ---------
    
    Co-authored-by: Mark Koch <48097969+mark-koch@users.noreply.github.com>
    croyzor and mark-koch authored Sep 12, 2024
    Configuration menu
    Copy the full SHA
    1286f60 View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2024

  1. feat!: array ops (#96)

    BREAKING CHANGE: `emit_new_array_alloc` is replaced by the more general
    `emit_array_op`
    
    ---------
    
    Co-authored-by: Craig Roy <croyzor@users.noreply.github.com>
    doug-q and croyzor authored Sep 13, 2024
    Configuration menu
    Copy the full SHA
    ede3f51 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2024

  1. feat: Add conversions itobool, ifrombool (#101)

    Closes #22
    
    ---------
    
    Co-authored-by: Craig Roy <craig.roy@cambridgequantum.com>
    Co-authored-by: Craig Roy <croyzor@users.noreply.github.com>
    Co-authored-by: Mark Koch <48097969+mark-koch@users.noreply.github.com>
    4 people authored Sep 16, 2024
    Configuration menu
    Copy the full SHA
    99ad943 View commit details
    Browse the repository at this point in the history
  2. feat: Add tket2 feature and lowerings for tket2.rotation extension (

    #100)
    
    Co-authored-by: Alec Edgington <54802828+cqc-alec@users.noreply.github.com>
    doug-q and cqc-alec authored Sep 16, 2024
    Configuration menu
    Copy the full SHA
    bcbd311 View commit details
    Browse the repository at this point in the history
  3. chore: release v0.5.0 (#98)

    ## 🤖 New release
    * `hugr-llvm`: 0.4.0 -> 0.5.0
    
    <details><summary><i><b>Changelog</b></i></summary><p>
    
    <blockquote>
    
    ## [0.5.0](CQCL/hugr-llvm@v0.4.0...v0.5.0) -
    2024-09-16
    
    ### New Features
    
    - Add emitters for int <-> float/usize conversions
    ([#94](CQCL/hugr-llvm#94))
    - [**breaking**] array ops
    ([#96](CQCL/hugr-llvm#96))
    - Add conversions itobool, ifrombool
    ([#101](CQCL/hugr-llvm#101))
    - Add `tket2` feature and lowerings for `tket2.rotation` extension
    ([#100](CQCL/hugr-llvm#100))
    
    ### Testing
    
    - Add execution test framework
    ([#97](CQCL/hugr-llvm#97))
    </blockquote>
    
    
    </p></details>
    
    ---
    This PR was generated with
    [release-plz](https://github.com/MarcoIeni/release-plz/).
    hugrbot authored Sep 16, 2024
    Configuration menu
    Copy the full SHA
    1fdc898 View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2024

  1. fix: remove wildcard (*) dependency constraint for crate publishing (

    …#105)
    
    Also sanitizes the READMEs a bit.
    
    The last attempt to publish a crate using release PR #98
    [failed](https://github.com/CQCL/hugr-llvm/actions/runs/10886782954/job/30207610938)
    with:
    ```
    error: failed to publish to registry at https://crates.io/
        
        Caused by:
          the remote server responded with an error (status 400 Bad Request): wildcard (`*`) dependency constraints are not allowed on crates.io. Crate with this problem: `serde` See https://doc.rust-lang.org/cargo/faq.html#can-libraries-use--as-a-version-for-their-dependencies for more information
    ```
    qartik authored Sep 17, 2024
    Configuration menu
    Copy the full SHA
    21dbefe View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2024

  1. feat: provide inline_constant_functions (#108)

    Co-authored-by: Alec Edgington <54802828+cqc-alec@users.noreply.github.com>
    doug-q and cqc-alec authored Sep 23, 2024
    Configuration menu
    Copy the full SHA
    8fddf68 View commit details
    Browse the repository at this point in the history
  2. chore: release v0.5.1 (#109)

    ## 🤖 New release
    * `hugr-llvm`: 0.5.0 -> 0.5.1 (✓ API compatible changes)
    
    <details><summary><i><b>Changelog</b></i></summary><p>
    
    <blockquote>
    
    ## [0.5.1](CQCL/hugr-llvm@v0.5.0...v0.5.1) -
    2024-09-23
    
    ### New Features
    
    - provide `inline_constant_functions`
    ([#108](CQCL/hugr-llvm#108))
    </blockquote>
    
    
    </p></details>
    
    ---
    This PR was generated with
    [release-plz](https://github.com/MarcoIeni/release-plz/).
    hugrbot authored Sep 23, 2024
    Configuration menu
    Copy the full SHA
    95606e4 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2024

  1. refactor!: remove trait emit op (#104)

    BREAKING CHANGE: Remove trait `EmitOp`
    doug-q authored Oct 1, 2024
    Configuration menu
    Copy the full SHA
    7d91295 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2024

  1. refactor!: rework extensions interface (#119)

    `CodegenExtension` is replaced with a new trait of the same name, that
    instead of defining extension behaviour provides a convenient interface
    for registering a set of extensions. The `prelude` extension gives the
    best example, exercising all the features.
    
    Extensions are now registered via methods on `CodegenExtsBuilder`, each
    method takes a callback that is stored in the builder. The builder is
    consumed by `finish` which returns a collection of "Callback Maps". One
    of the big wins here is that the "Type Callback Map" does not depend on
    a `H: HugrView` parameter.
    
    The "root" `&'c Context` now lives in `EmitModuleContext`, as well as in
    `TypingSession`.
    
    `TypeConverter` is now the "Type Callback Map". This is implemented
    using the new `src/utils/type_map.rs`, which we intend to leverage for
    computing "def-hooks" and "destructors" for types.
     
    We go to some effort to ensure the callbacks are not required to have
    `'static` lifetimes, nothing inside `crate::custom` assumes or requires
    this. However, we do in several places (e.g. `TypingSession`,
    `EmitModuleContext`) fix these lifetimes to `'static`, in lieu of adding
    additional lifetime parameters to these types.
    
    We have removed the `guppy.rs` test case, which was ignored, rather than
    rework it to use the new interface.
    Otherwise, test cases are largely unchanged, and there are no snapshot
    changes.
    
    All extensions have been changed to use the new interface, which is
    largely just moving code around. In some cases error messages are
    consolidated by the new tools providing more appropriate inputs to
    extension points. See for example `CodegenExtsBuilder::custom_const`.
    
    
    At several points we mark TODO refactorings that will be carried out in
    the near future.
    
    BREAKING CHANGE: extensions interface in `src/custom.rs` entirely
    reworked.
    
    ---------
    
    Co-authored-by: Agustín Borgna <121866228+aborgna-q@users.noreply.github.com>
    doug-q and aborgna-q authored Oct 11, 2024
    Configuration menu
    Copy the full SHA
    d27798a View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2024

  1. refactor!: move packaged extensions from crate::custom to `crate::e…

    …xtension` (#126)
    
    Closes #121.
    
    BREAKING CHANGE: moved extension modules from `crate::custom` to
    `crate::extension`. Moved `crate::fat` to `crate::utils::fat`.
    doug-q authored Oct 14, 2024
    Configuration menu
    Copy the full SHA
    ef55558 View commit details
    Browse the repository at this point in the history
  2. feat!: Allow extension callbacks to have non-'static lifetimes (#128)

    Closes #127.
    
    BREAKING CHANGE: Add a lifetime argument to `TypingSession`,
    `EmitModuleContext`, `EmitHugr`, `EmitFuncContext`.
    doug-q authored Oct 14, 2024
    Configuration menu
    Copy the full SHA
    f7c86d5 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2024

  1. chore: update devenv (#134)

    Note that updating `rustc` caused several errors, which are fixed here.
    New clippy suggestions are also applied.
    doug-q authored Oct 21, 2024
    Configuration menu
    Copy the full SHA
    ce14684 View commit details
    Browse the repository at this point in the history
  2. ci: Unpin nightly rustc (#135)

    The linked bug was resolved a while ago.
    aborgna-q authored Oct 21, 2024
    Configuration menu
    Copy the full SHA
    19fdb17 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    22d1d0f View commit details
    Browse the repository at this point in the history
  4. feat!: Support tket2.rotation.from_halfturns_unchecked (#133)

    Closes #132 
    
    BREAKING CHANGE: `PreludeCodegen::emit_panic` now takes a single
    configurable value.
    doug-q authored Oct 21, 2024
    Configuration menu
    Copy the full SHA
    9e55d9a View commit details
    Browse the repository at this point in the history
  5. chore: release v0.6.0 (#114)

    ## 🤖 New release
    * `hugr-llvm`: 0.5.1 -> 0.6.0 (⚠️ API breaking changes)
    
    ### ⚠️ `hugr-llvm` breaking changes
    
    ```
    --- failure auto_trait_impl_removed: auto trait no longer implemented ---
    
    Description:
    A public type has stopped implementing one or more auto traits. This can break downstream code that depends on the traits being implemented.
            ref: https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits
           impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.36.0/src/lints/auto_trait_impl_removed.ron
    
    Failed in:
      type TypeConverter is no longer UnwindSafe, in /tmp/.tmpGjujM0/hugr-llvm/src/types.rs:59
      type TypeConverter is no longer RefUnwindSafe, in /tmp/.tmpGjujM0/hugr-llvm/src/types.rs:59
    
    --- failure derive_trait_impl_removed: built-in derived trait no longer implemented ---
    
    Description:
    A public type has stopped deriving one or more traits. This can break downstream code that depends on those types implementing those traits.
            ref: https://doc.rust-lang.org/reference/attributes/derive.html#derive
           impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.36.0/src/lints/derive_trait_impl_removed.ron
    
    Failed in:
      type TypeConverter no longer derives Copy, in /tmp/.tmpGjujM0/hugr-llvm/src/types.rs:59
      type TypeConverter no longer derives Clone, in /tmp/.tmpGjujM0/hugr-llvm/src/types.rs:59
      type TypeConverter no longer derives Debug, in /tmp/.tmpGjujM0/hugr-llvm/src/types.rs:59
    
    --- failure function_missing: pub fn removed or renamed ---
    
    Description:
    A publicly-visible function cannot be imported by its prior path. A `pub use` may have been removed, or the function itself may have been renamed or removed entirely.
            ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
           impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.36.0/src/lints/function_missing.ron
    
    Failed in:
      function hugr_llvm::custom::prelude::array::emit_array_op, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/prelude/array.rs:51
      function hugr_llvm::custom::int::add_int_extensions, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/int.rs:226
      function hugr_llvm::custom::rotation::add_rotation_extensions, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/rotation.rs:196
      function hugr_llvm::custom::prelude::add_prelude_extensions, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/prelude.rs:295
      function hugr_llvm::custom::float::add_float_extensions, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/float.rs:186
      function hugr_llvm::custom::conversions::add_conversions_extension, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/conversions.rs:270
      function hugr_llvm::custom::logic::add_logic_extensions, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/logic.rs:106
      function hugr_llvm::custom::prelude::add_default_prelude_extensions, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/prelude.rs:304
    
    --- failure inherent_method_missing: pub method removed or renamed ---
    
    Description:
    A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely.
            ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
           impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.36.0/src/lints/inherent_method_missing.ron
    
    Failed in:
      TypeConverter::new, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/types.rs:107
      TypeConverter::iw_context, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/types.rs:112
      CodegenExtsMap::add_float_extensions, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/float.rs:192
      CodegenExtsMap::add_int_extensions, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/int.rs:234
      CodegenExtsMap::add_logic_extensions, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/logic.rs:113
      CodegenExtsMap::add_default_prelude_extensions, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/prelude.rs:311
      CodegenExtsMap::add_prelude_extensions, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/prelude.rs:317
      CodegenExtsMap::add_rotation_extensions, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/rotation.rs:201
      CodegenExtsMap::new, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom.rs:88
      CodegenExtsMap::add_cge, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom.rs:97
      CodegenExtsMap::get, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom.rs:110
      CodegenExtsMap::llvm_type, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom.rs:120
      CodegenExtsMap::emit, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom.rs:130
      CodegenExtsMap::load_constant, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom.rs:145
    
    --- failure module_missing: pub module removed or renamed ---
    
    Description:
    A publicly-visible module cannot be imported by its prior path. A `pub use` may have been removed, or the module may have been renamed, removed, or made non-public.
            ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
           impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.36.0/src/lints/module_missing.ron
    
    Failed in:
      mod hugr_llvm::custom::conversions, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/conversions.rs:1
      mod hugr_llvm::custom::logic, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/logic.rs:1
      mod hugr_llvm::custom::int, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/int.rs:1
      mod hugr_llvm::custom::prelude, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/prelude.rs:1
      mod hugr_llvm::fat, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/fat.rs:1
      mod hugr_llvm::custom::float, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/float.rs:1
      mod hugr_llvm::custom::rotation, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/rotation.rs:1
      mod hugr_llvm::custom::prelude::array, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/prelude/array.rs:1
    
    --- failure struct_missing: pub struct removed or renamed ---
    
    Description:
    A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct itself may have been renamed or removed entirely.
            ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
           impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.36.0/src/lints/struct_missing.ron
    
    Failed in:
      struct hugr_llvm::custom::logic::LogicCodegenExtension, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/logic.rs:78
      struct hugr_llvm::fat::FatNode, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/fat.rs:28
      struct hugr_llvm::custom::int::IntOpsCodegenExtension, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/int.rs:120
      struct hugr_llvm::custom::prelude::PreludeCodegenExtension, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/prelude.rs:174
      struct hugr_llvm::custom::float::FloatTypesCodegenExtension, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/float.rs:27
      struct hugr_llvm::emit::NullEmitLlvm, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/emit.rs:52
      struct hugr_llvm::custom::conversions::ConversionsCodegenExtension, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/conversions.rs:244
      struct hugr_llvm::custom::prelude::DefaultPreludeCodegen, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/prelude.rs:169
      struct hugr_llvm::custom::int::IntTypesCodegenExtension, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/int.rs:150
      struct hugr_llvm::custom::rotation::RotationCodegenExtension, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/rotation.rs:30
    
    --- failure trait_method_added: pub trait method added ---
    
    Description:
    A non-sealed public trait added a new method without a default implementation, which breaks downstream implementations of the trait
            ref: https://doc.rust-lang.org/cargo/reference/semver.html#trait-new-item-no-default
           impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.36.0/src/lints/trait_method_added.ron
    
    Failed in:
      trait method hugr_llvm::custom::CodegenExtension::add_extension in file /tmp/.tmpGjujM0/hugr-llvm/src/custom.rs:41
    
    --- failure trait_method_missing: pub trait method removed or renamed ---
    
    Description:
    A trait method is no longer callable, and may have been renamed or removed entirely.
            ref: https://doc.rust-lang.org/cargo/reference/semver.html#major-any-change-to-trait-item-signatures
           impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.36.0/src/lints/trait_method_missing.ron
    
    Failed in:
      method extension of trait CodegenExtension, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom.rs:38
      method supported_consts of trait CodegenExtension, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom.rs:44
      method llvm_type of trait CodegenExtension, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom.rs:50
      method emitter of trait CodegenExtension, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom.rs:58
      method load_constant of trait CodegenExtension, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom.rs:68
    
    --- failure trait_missing: pub trait removed or renamed ---
    
    Description:
    A publicly-visible trait cannot be imported by its prior path. A `pub use` may have been removed, or the trait itself may have been renamed or removed entirely.
            ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
           impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.36.0/src/lints/trait_missing.ron
    
    Failed in:
      trait hugr_llvm::emit::EmitOp, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/emit.rs:45
      trait hugr_llvm::custom::prelude::PreludeCodegen, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/custom/prelude.rs:52
      trait hugr_llvm::fat::FatExt, previously in file /tmp/.tmpu0X9jI/hugr-llvm/src/fat.rs:313
    
    --- failure trait_no_longer_object_safe: trait no longer object safe ---
    
    Description:
    Trait is no longer object safe, which breaks `dyn Trait` usage.
            ref: https://doc.rust-lang.org/stable/reference/items/traits.html#object-safety
           impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.36.0/src/lints/trait_no_longer_object_safe.ron
    
    Failed in:
      trait CodegenExtension in file /tmp/.tmpGjujM0/hugr-llvm/src/custom.rs:38
    ```
    
    <details><summary><i><b>Changelog</b></i></summary><p>
    
    <blockquote>
    
    ## [0.6.0](CQCL/hugr-llvm@v0.5.1...v0.6.0) -
    2024-10-21
    
    ### Bug Fixes
    
    - Conversion operations having poison results
    ([#131](CQCL/hugr-llvm#131))
    
    ### New Features
    
    - [**breaking**] Allow extension callbacks to have non-`'static`
    lifetimes ([#128](CQCL/hugr-llvm#128))
    - [**breaking**] Support `tket2.rotation.from_halfturns_unchecked`
    ([#133](CQCL/hugr-llvm#133))
    
    ### Refactor
    
    - [**breaking**] remove trait emit op
    ([#104](CQCL/hugr-llvm#104))
    - [**breaking**] rework extensions interface
    ([#119](CQCL/hugr-llvm#119))
    - [**breaking**] move packaged extensions from `crate::custom` to
    `crate::extension` ([#126](CQCL/hugr-llvm#126))
    </blockquote>
    
    
    </p></details>
    
    ---
    This PR was generated with
    [release-plz](https://github.com/MarcoIeni/release-plz/).
    hugrbot authored Oct 21, 2024
    Configuration menu
    Copy the full SHA
    2d9bfce View commit details
    Browse the repository at this point in the history
  6. Add 'hugr-llvm/' from commit '2d9bfce9ee7b9d460bfa63465850dac49b5c6e1f'

    git-subtree-dir: hugr-llvm
    git-subtree-mainline: c5b597d
    git-subtree-split: 2d9bfce
    doug-q committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    f9ad559 View commit details
    Browse the repository at this point in the history
  7. wip

    doug-q committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    491eb33 View commit details
    Browse the repository at this point in the history