Type inference: Small join-order tweak#22114
Open
hvitved wants to merge 1 commit into
Open
Conversation
Contributor
Author
Contributor
There was a problem hiding this comment.
Pull request overview
This PR applies a targeted join-order/performance tweak in the shared type inference library, extracted from #21795, primarily by removing the higher-fanout candidate predicate that depended on getTarget expansion.
Changes:
- Reworks the
argRootTypeSatisfiesTargetTypeCandcandidate logic to avoid the previous higher-fanout approach described in the PR metadata. - Introduces an intermediate predicate (
accessTargetsWithArgRootType) to separate access target enumeration from type-candidate filtering. - Tightens some bindings in
baseTypeMatchusingpragma[only_bind_into]to influence evaluation order/binding behavior.
Show a summary per file
| File | Description |
|---|---|
| shared/typeinference/codeql/typeinference/internal/TypeInference.qll | Adjusts internal type inference candidate selection/binding structure to reduce join explosion risk. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Low
Contributor
Author
|
Rerun has been triggered, but no failed runs found |
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.
A small performance tweak extracted from #21795, where it makes a big difference. The most important change in this PR is the removal of
argRootTypeSatisfiesTargetTypeCand/7, which could have a large explosion because ofgetTargetfan-out.