Skip to content

Type inference: Small join-order tweak#22114

Open
hvitved wants to merge 1 commit into
github:mainfrom
hvitved:type-inference-join
Open

Type inference: Small join-order tweak#22114
hvitved wants to merge 1 commit into
github:mainfrom
hvitved:type-inference-join

Conversation

@hvitved

@hvitved hvitved commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

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 of getTarget fan-out.

@hvitved hvitved added the no-change-note-required This PR does not need a change note label Jul 3, 2026
@hvitved hvitved marked this pull request as ready for review July 3, 2026 07:53
@hvitved hvitved requested a review from a team as a code owner July 3, 2026 07:53
Copilot AI review requested due to automatic review settings July 3, 2026 07:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 argRootTypeSatisfiesTargetTypeCand candidate 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 baseTypeMatch using pragma[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

@hvitved

hvitved commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author
Rerun has been triggered, but no failed runs found ⚠️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-change-note-required This PR does not need a change note

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants