Skip to content

Conversation

@tlively
Copy link
Member

@tlively tlively commented Jan 13, 2026

No description provided.

ReorderTypes previously collected the module types and their counts,
even though it already extends GlobalTypeRewriter, which also collects
the module types in its constructor. Not only did this duplicate work,
it was also a subtle source of bugs because ReorderTypes and
GlobalTypeRewriter collected types slightly differently. ReorderTypes
collected the binary types and GlobalTypeRewriter collected the used IR
types. This could result in different types being collected for the same
multivalue control flow signatures, causing an assertion failure when
a type was seemingly missing from the collected info.

Fix the problem and make the pass more efficient by simply not
collecting the types two separate times.
Update a comment to better match the code and tweak a loop to avoid
repeated work.
@tlively tlively requested a review from kripken January 13, 2026 03:02
@tlively tlively force-pushed the fuzz-reorder-types branch from 205792e to df019f7 Compare January 13, 2026 03:05
@tlively tlively force-pushed the fuzz-reorder-types branch from df019f7 to 970fa65 Compare January 13, 2026 03:15
Base automatically changed from type-collection-minor-fixes to main January 15, 2026 17: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.

3 participants