Skip to content

ConstraintAnalysis: Optimize non-nullability - #9433

Merged
kripken merged 14 commits into
WebAssembly:mainfrom
kripken:ca.gc
Nov 25, 2026
Merged

kripken merged 14 commits into
WebAssembly:mainfrom
kripken:ca.gc

Conversation

@kripken

@kripken kripken commented Nov 25, 2026

Copy link
Copy Markdown
Member

When we write a non-nullable value to a nullable local, we can note
that it is non-nullable.

@github-actions
github-actions Bot requested a review from aheejin November 25, 2026 16:59
// sets the value for that local.
void applyToConstraints(Expression* curr,
BasicBlockConstraintMap& constraints) {
if (auto* set = curr->dynCast<LocalSet>()) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not related to this PR, but this can be an early exit?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It can, yes, though by chance my next PR will be rewriting this code anyhow, so I'll look into improving this there.

@kripken
kripken merged commit e100f01 into WebAssembly:main Nov 25, 2026
20 checks passed
@kripken
kripken deleted the ca.gc branch November 25, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants