Repository navigation
Conversation
Previously ChildTyper would crash when run on an expression that did not have type immediate information, e.g. a StructGet with a null child. This is fine when IRBuilder uses ChildTyper because it has access to the original type immediates. The other user of ChildTyper, TypeSSA, worked around the problem by checking whether the type immediate information was available before calling ChildTyper. As various type generalization passes become more important, ChildTyper will need to run on arbitrary IR to help do backward type analyses. Fix ChildTyper so it calls noteUnknown() rather than crashing when the information it needs is absent. Remove the check from TypeSSA so we can get full test coverage of the new changes via TypeSSA lit tests.
There was a problem hiding this comment.
Code Review
This pull request refactors the ChildTyper to use more specific type checks (such as isStruct(), isArray(), and isContinuation()) instead of generic isRef() checks. Additionally, it updates the TypeSSA pass analyzer to properly visit sub-expressions for RefCast and BrOn instructions, refines the optimization-skipping logic, and adds comprehensive test coverage for these scenarios. I have no feedback to provide as there are no review comments to evaluate.
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Previously ChildTyper would crash when run on an expression that did not have type immediate information, e.g. a StructGet with a null child. This is fine when IRBuilder uses ChildTyper because it has access to the original type immediates. The other user of ChildTyper, TypeSSA, worked around the problem by checking whether the type immediate information was available before calling ChildTyper.
As various type generalization passes become more important, ChildTyper will need to run on arbitrary IR to help do backward type analyses. Fix ChildTyper so it calls noteUnknown() rather than crashing when the information it needs is absent. Remove the check from TypeSSA so we can get full test coverage of the new changes via TypeSSA lit tests.