Skip to content

Vacuum: Do not turn unreachable into nop#8387

Open
kripken wants to merge 3 commits intoWebAssembly:mainfrom
kripken:vac.unr
Open

Vacuum: Do not turn unreachable into nop#8387
kripken wants to merge 3 commits intoWebAssembly:mainfrom
kripken:vac.unr

Conversation

@kripken
Copy link
Member

@kripken kripken commented Feb 25, 2026

This allows propagation of unreachability to callers.

We do not propagate it yet though, so we may want to wait on landing this.

Copy link
Member

@tlively tlively left a comment

Choose a reason for hiding this comment

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

LGTM whether we want to wait for some kind of propagation or not.

@kripken
Copy link
Member Author

kripken commented Feb 26, 2026

Actually we don't need any propagation 😄 Inlining does it. Added a test to verify.

;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited.

;; RUN: foreach %s %t wasm-opt --inlining -S -o - | filecheck %s
;; RUN: foreach %s %t wasm-opt --inlining -tnh -S -o - | filecheck %s
Copy link
Member

Choose a reason for hiding this comment

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

should this have a different check prefix?

Copy link
Member Author

Choose a reason for hiding this comment

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

Why, if the result is the same?

Copy link
Member

Choose a reason for hiding this comment

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

Oh I see, I was confused about why they would be the same. This is just doing inlining, not vacuuming.

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