Avoid need to rerun extension inference after outline-cfg rewrite #534
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.
Mostly by updating the builder to allow specifying ExtensionSets in places not previously possible: cfg_builder(), BlockBuilder::new, and BlockBuilder::create.
I could go further: there is
fn block_builder
(andfn simple_block_builder
and others), which frustratingly takeFunctionType
s (that I cannot update to Signature because Sig requires an ExtensionSet not an Option thereof, so extra argument again)....I guess requiring to specify
None
as extra param in the builder, may be an OK price to keep the current behaviour of "run inference later"??The above then avoids needing to
infer_and_validate
in OutlineCfg tests after the rewrite, justvalidate
works. It'd be good to keep the other Inline/Outline rewrites and InsertIdentity like this too, but it's probably not a desirable goal for anything taking a subgraph from the user (i.e. (Simple/)Replace), where we should certainly allow to infer requirements across the newly-inserted bit of graph...