-
Notifications
You must be signed in to change notification settings - Fork 15
feat: Define pass application scopes #2772
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
1f05f19
feat: Define pass application scopes
aborgna-q aba6477
Stub implementation for all passes
aborgna-q 3e0c6ac
Python definition for PassScope
aborgna-q 02d2886
Add default with_scope impl, make this non-breaking
aborgna-q e3a63b4
Move scope to a submodule of ::composable
aborgna-q 0b730bf
wip
acl-cqc e71125c
All=>Preserve (make global), add PreserveEntrypoint, enum InScope
acl-cqc 11a643e
docs, re-export InScope
acl-cqc 51bfb59
Add PassScope::from_entrypoint
acl-cqc c1a1898
note idempotency in composablepass/::then
acl-cqc 90172c5
redefine, make tests pass
acl-cqc d678210
test renaming
acl-cqc d6eba57
docs, re-export
acl-cqc 3295c8e
Merge remote-tracking branch 'origin/main' into ab/pass-scopes
acl-cqc f98093d
Various doc improvements, and module root is PreserveInterface
acl-cqc 14c5b9b
reimplement in python (no tests)
acl-cqc a3e07c9
PassScopeBase has regions/in_scope meths+dedup docs, metaclass fun
acl-cqc 540dab7
scope.rs: unless it is set to --> unless the entrypoint is
acl-cqc a6ebb96
doc re. EntrypointFlat
acl-cqc 85a094d
with_scope takes impl Into<PassScope>
acl-cqc 834edd9
update python docs to mirror Rust
acl-cqc 22e951a
fmt-py
acl-cqc 6a4332d
python: don't preserve all non-function module-children
acl-cqc 968c12e
Remove note to reviewers
acl-cqc 332bc84
remove from_entrypoint, for next PR
acl-cqc 1c38f50
python tests, extend builder to allow setting visibility
acl-cqc 6b05449
test_hug -> test_hugr
acl-cqc 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,30 +1,36 @@ | ||
| //! Compilation passes acting on the HUGR program representation. | ||
|
|
||
| pub mod composable; | ||
| pub use composable::ComposablePass; | ||
| pub mod const_fold; | ||
| pub mod dataflow; | ||
| pub mod dead_code; | ||
| pub use dead_code::DeadCodeElimPass; | ||
| mod dead_funcs; | ||
| pub use dead_funcs::{RemoveDeadFuncsError, RemoveDeadFuncsPass, remove_dead_funcs}; | ||
| pub mod force_order; | ||
| mod half_node; | ||
| pub mod inline_dfgs; | ||
| pub mod inline_funcs; | ||
| pub use inline_funcs::inline_acyclic; | ||
| pub mod lower; | ||
| mod monomorphize; | ||
| pub mod nest_cfgs; | ||
| pub mod non_local; | ||
| pub mod normalize_cfgs; | ||
| pub mod redundant_order_edges; | ||
| pub mod replace_types; | ||
| pub mod scope; | ||
| pub mod untuple; | ||
|
|
||
| pub use monomorphize::{MonomorphizePass, mangle_name, monomorphize}; | ||
| pub mod replace_types; | ||
| pub use replace_types::ReplaceTypes; | ||
| pub mod nest_cfgs; | ||
| pub mod non_local; | ||
| mod dead_funcs; | ||
| mod half_node; | ||
| mod monomorphize; | ||
|
|
||
| // Main pass interfaces | ||
| pub use composable::ComposablePass; | ||
| pub use scope::PassScope; | ||
|
|
||
| // Pass re-exports | ||
| pub use dead_code::DeadCodeElimPass; | ||
| pub use dead_funcs::{RemoveDeadFuncsError, RemoveDeadFuncsPass, remove_dead_funcs}; | ||
| pub use force_order::{force_order, force_order_by_key}; | ||
| pub use inline_funcs::inline_acyclic; | ||
| pub use lower::{lower_ops, replace_many_ops}; | ||
| pub use monomorphize::{MonomorphizePass, mangle_name, monomorphize}; | ||
| pub use non_local::{ensure_no_nonlocal_edges, nonlocal_edges}; | ||
| pub use replace_types::ReplaceTypes; | ||
| pub use untuple::UntuplePass; |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.