Skip to content

Conversation

kripken
Copy link
Member

@kripken kripken commented Jul 30, 2024

We had a TODO to use it once Names was optimized, which it has been.

The Names version is also far faster. When building
https://github.com/JetBrains/kotlinconf-app it saves 70 seconds(!).

@kripken kripken requested a review from tlively July 30, 2024 22:51
@kripken
Copy link
Member Author

kripken commented Jul 30, 2024

This isn't NFC as there are minor observable differences in the names compared to before, but the new names should be just as good.

Added a test for collisions with the new naming scheme that prefers _ (there is now a function with the name func_1 rather than func.1, compared to the old test, which is kept).

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.

Wow, that's a shocking improvement.

Copy link
Member

Choose a reason for hiding this comment

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

Can you add this as a lit test under lit/binary instead? Although it looks a like there is already an updated lit test, so maybe it isn't necessary to add a new test at all?

Copy link
Member Author

Choose a reason for hiding this comment

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

The tests check slightly different things, different possible name overlaps, with '.', '_', '$', so I think we need all three. I converted the non-lit ones to lit.

@kripken kripken merged commit c689781 into WebAssembly:main Jul 31, 2024
@kripken kripken deleted the fast.name branch July 31, 2024 17:16
kripken added a commit to emscripten-core/emscripten that referenced this pull request Aug 1, 2024
WebAssembly/binaryen#6793 alters names of functions, which two metadce tests turn out to be sensitive to. (It changes the suffixes we use to deduplicate identical names.)
kripken added a commit to emscripten-core/emscripten that referenced this pull request Aug 2, 2024
This re-enables the tests and updates the outputs. The suffixes vanish here as WebAssembly/binaryen#6793 replaces .1 with _1, and we have code in this test to ignore such suffixes (as LLVM adds them, and we strip hem to make the output less likely to change frequently).
@gkdn gkdn mentioned this pull request Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants