-
Notifications
You must be signed in to change notification settings - Fork 7
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!: Add monomorphization
pass
#1733
Merged
Merged
Changes from all commits
Commits
Show all changes
72 commits
Select commit
Hold shift + click to select a range
24bff91
Add {Dataflow,}OpTrait::substitute - compiles, no tests
acl-cqc 341e537
WIP Add Hugr::substitute
acl-cqc 6a96b2c
WIP monomorphize via mono_scan
acl-cqc 7866a62
Use continue, match instead of if let |
acl-cqc 871e796
WIP start copying edges...no not so simple
acl-cqc ac536c5
Break out is_polymorphic_funcdefn, tho only used once; remove obsolet…
acl-cqc ff04f13
Separate 'fn instantiate' to copy edges, add struct Instantiating; mv…
acl-cqc e5f665b
Use Instantiating::poly_func, drop is_polymorphic_funcdefn; and ..**inst
acl-cqc 6c00ad0
mangle inner names, switch from impl HugrMut to &mut Hugr
acl-cqc b666dd5
two-level Instantiations, flatten in instantiate()
acl-cqc 5a4a0f9
Add remove_polyfuncs, using remove_subtree
acl-cqc 7de2c2b
comments
acl-cqc 5bb0c57
name_mangle => mangle_name
acl-cqc b04e1cf
WIP tests
acl-cqc 4aa6c79
refactor: let mut = Instantiating; use static_output_port
acl-cqc a7d6137
Fixes: monomorphize Call op; read static input from old_ch
acl-cqc 48a6598
Test: use pair/triple not list
acl-cqc 937a6d0
Implement mangle_name
acl-cqc f15f09f
fixup! Test: use pair
acl-cqc d5f15ff
fix edge handling
acl-cqc ad00327
clippy/lint, docs
acl-cqc c5a0f8d
test remove_polyfuncs
acl-cqc 04d60b1
Shorten test a bit
acl-cqc 3be790e
Factor out is_polymorphic_funcdefn, avoid root
acl-cqc 4a9f7a2
remove_polyfuncs if non-module-rooted; implement mangle_inner_func
acl-cqc 8178b5d
Fix monomorphized func -> Call edges
acl-cqc 2090218
Test flattening (and multiple calls with different typeargs from one …
acl-cqc 6ff4c3b
Merge remote-tracking branch 'origin/main' into acl/monomorphize
acl-cqc 4429152
tidy
acl-cqc 9fc3271
clippy
acl-cqc 9f0b906
Make test_module also test recursion
acl-cqc 1b7f9ee
fix doclink
acl-cqc 8a52185
helper list_funcs
acl-cqc 5d54ee3
Test part-flattening
acl-cqc bbcda39
fix tests for all-features
acl-cqc bdfdbbd
Merge remote-tracking branch 'origin/main' into acl/monomorphize
acl-cqc a26fa49
silence clippy
acl-cqc 275b155
common up is_polymorphic
acl-cqc f7a6dca
Move monomorphize.rs into hugr-passes, pub Substitution::new
acl-cqc 3e755d1
substitute(self) -> substitute(&self) calling subst_mut(&mut self)
acl-cqc 41d0812
Revert subst_mut; substitute takes &self; OpTrait requires Clone
acl-cqc c0eae19
Merge remote-tracking branch 'origin/main' into acl/monomorphize
acl-cqc d4ab4aa
can't monomorphize array ops polymorphic in size because can't define…
acl-cqc 565a78a
Revert "can't monomorphize array ops polymorphic in size because can'…
acl-cqc 134bda4
A couple of test tidies
acl-cqc 9f88f97
Remove remove_polyfuncs
acl-cqc 5d0ca00
Tests in controlflow.rs
acl-cqc 2fb8a92
Merge branch 'main' of gh:CQCL-DEV/hugr into acl/monomorphize
doug-q 00c918c
Revert "Remove remove_polyfuncs"
doug-q 43826be
wip
doug-q 802d361
fix!: Replace `LoadFunction::signature` with `LoadFunction::instantia…
doug-q 71253c8
Merge remote-tracking branch 'origin/doug/loadfunction-instantiation'…
doug-q afb6e17
Adjust flattening test to also check multiple typeargs and BoundedNats
acl-cqc 5d2ff7d
wip
doug-q efc461a
Merge branch 'main' of gh:CQCL-DEV/hugr into acl/monomorphize
doug-q 703004e
wip
doug-q 43c2f3e
Revert "wip"
doug-q bc839b7
Merge branch 'main' of gh:CQCL-DEV/hugr into acl/monomorphize
doug-q 0adb432
fix up merge
doug-q d933d59
Merge branch 'acl/monomorphize' of gh:CQCL-DEV/hugr into acl/monomorp…
doug-q 5845706
fmt
doug-q 6049889
add array extension to signatures
doug-q 144fc47
fmt
doug-q becc847
lint
doug-q df38d88
docs + tweak name mangling
doug-q 4bde01d
docs
doug-q d693c81
Update hugr-passes/src/monomorphize.rs
doug-q 61afb2e
Update hugr-passes/src/monomorphize.rs
doug-q 7618fa3
Update hugr-passes/src/monomorphize.rs
doug-q 44a354c
Update hugr-passes/src/monomorphize.rs
doug-q 821c68e
remove call_indirect helper
doug-q ae2b850
Merge branch 'acl/monomorphize' of gh:CQCL-DEV/hugr into acl/monomorp…
doug-q File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised this isn't covered, it should be right?