-
Notifications
You must be signed in to change notification settings - Fork 15
feat!: Handle CallIndirect in constant folding #2046
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
Closed
Closed
Changes from 7 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
12c4b6e
No need for ConstFoldContext to impl Deref
acl-cqc 3f764ec
Hide value_handle, no need for it to be public
acl-cqc f6fbf08
Add ValueHandle::NodeRef(N, TypeArgs), with fallible conversion to Value
acl-cqc 817b9d9
ConstFoldContext handles LoadFunction by returning ValueHandle::NodeRef
acl-cqc 2676af7
DFContext interpret_call_indirect
acl-cqc 55fc233
Handle CallIndirect in ConstFoldContext...by complete recursion
acl-cqc 3794f13
add constant_fold_with_hugr
acl-cqc 6d8f250
Revert "add constant_fold_with_hugr"
acl-cqc 2604539
Revert "Hide value_handle, no need for it to be public"
acl-cqc a119e07
relax Node=Node constraint for ConstLoader
acl-cqc 482a435
note why we can't relax Node=Node for DFContext
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
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.
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.
It's quite annoying that we have to make this a breaking change.
It looks like even leaving this as public wouldn't help, since
ValueHandleis notnon_exhaustiveand added new fields -.-Is it OK to wait in merging this PR until we accumulate other breaking changes?
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.
Yeah, I was hiding that because I thought that's the way that it should have been, would have avoided this being a breaking change now...
How urgent....I was gonna say, the bit we need first is the
constant_fold_with_hugrand that's non-breaking so I can break that out and leave the rest as a demo (just tests that the ValueHandle/CallIndirect works would confirm we can do the same approach in/for BRAT).However....now I realize we need to get the ValueHandle::NodeRef into the BRAT-specific constant-folding code. At present extension-provided constant-folders only get Hugr
Values, so rather than addingconstant_fold_with_hugrI think I need some kind of plugin interface to the constant-folding pass that lets us get at those ValueHandles after all. So I think I'll have to restorepubness and figure out what the plugin interface is.