You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Set the scope configuration used to run the pass.////// See [`PassScope`] for more details.////// In `hugr 0.25.*`, this configuration is only a guidance, and may be/// ignored by the pass.////// From `hugr >=0.26.0`, passes must respect the scope configuration.fnComposablePass::with_scope_internal(self,scope:&PassScope) -> Self;
ConstantFoldPass - store Option<PassScope> so that None retains the old behaviour (entrypoint-subtree even if entrypoint is module-root, as PassScope::Entrypoint would do nothing in latter case).
Also retain with_inputs; deprecate constant_fold_pass (which preserved all functions).
DeadCodeElimPass - similar Option<PassScope>
retain with_entry_points.
NormalizeCFGPass - store Either<Vec<N>, PassScope>
deprecate fn cfgs -> &mut Vec.
RemoveDeadFuncsPass - store Either<Vec<Node>, PassScope>
deprecate ...with_module_entry_points and remove_dead_funcs.
ReplaceTypes - switch Option<Vec<Node>> to Either<PassScope, Vec<Node>> as the old None roughly corresponds to a default PassScope::Global.
deprecate set_regions.
Note that as a lowering pass, this generally ignores preserve.
UntuplePass: store Either<PassScope, (UntupleRecursive, Option<Node>)>
deprecate new, set_parent, recursive and UntupleRecursive.
InlineDFGsPass: struct stores a PassScope. This changes InlineDFGsPass to InlineDFGsPass::default() which has the same behaviour (preserves the entrypoint; also any functions but they aren't DFGs)
MonomorphizePass similarly
LocalizeEdges similarly, plus some refactoring/moving of toplevel methods
RedundantOrderEdgesPass: scorched earth move from recursive:bool beneath entrypoint to PassScope as cannot make nonbreaking due to derivation of Copy
See #2772
(#2921 will change the location of this method)
feat: update passes to use PassScope where non-breaking #2836 - generally keeping old configurators with proviso that these and
with_scope_internaloverride previous calls to the other.ConstantFoldPass- storeOption<PassScope>so thatNoneretains the old behaviour (entrypoint-subtree even if entrypoint is module-root, as PassScope::Entrypoint would do nothing in latter case).with_inputs; deprecateconstant_fold_pass(which preserved all functions).DeadCodeElimPass- similarOption<PassScope>with_entry_points.NormalizeCFGPass- storeEither<Vec<N>, PassScope>fn cfgs -> &mut Vec.RemoveDeadFuncsPass- storeEither<Vec<Node>, PassScope>...with_module_entry_pointsandremove_dead_funcs.ReplaceTypes- switchOption<Vec<Node>>toEither<PassScope, Vec<Node>>as the oldNoneroughly corresponds to a default PassScope::Global.set_regions.preserve.UntuplePass: storeEither<PassScope, (UntupleRecursive, Option<Node>)>new,set_parent,recursiveandUntupleRecursive.fn monomorphizebreaking change required: feat!: Update remainder of passes to use PassScope, drop default with_scope #2871
InlineDFGsPass: struct stores a PassScope. This changesInlineDFGsPasstoInlineDFGsPass::default()which has the same behaviour (preserves the entrypoint; also any functions but they aren't DFGs)MonomorphizePasssimilarlyLocalizeEdgessimilarly, plus some refactoring/moving of toplevel methodsRedundantOrderEdgesPass: scorched earth move fromrecursive:boolbeneath entrypoint toPassScopeas cannot make nonbreaking due to derivation ofCopytket passes: feat!: Follow pass scopes in composable passes tket2#1429
ModifierResolverPassBorrowSquashPassNormalizeGuppyLowerDropsPassReplaceBoolPassLowerTketToQSystemPassReplaceStaticArrayBoolPass