Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip beam_ssa_alias for modules with huge functions #7672

Merged

Conversation

bjorng
Copy link
Contributor

@bjorng bjorng commented Sep 21, 2023

The implementation of the beam_ssa_alias pass in OTP 26 can become extremly slow for modules containing huge functions. The master branch (for the OTP 27 release next year) already contains a much better implementation that handles huge functions. That implementation is also very different, so we don't want to back-port it to OTP 26.

To make the compiler in OTP 26 usable for huge functions, add a heuristic that disables the alias analysis pass for functions exceeding a certain number of blocks.

Fixes #7667

@bjorng bjorng added team:VM Assigned to OTP team VM fix testing currently being tested, tag is used by OTP internal CI labels Sep 21, 2023
@bjorng bjorng self-assigned this Sep 21, 2023
@bjorng bjorng linked an issue Sep 21, 2023 that may be closed by this pull request
@github-actions
Copy link
Contributor

github-actions bot commented Sep 21, 2023

CT Test Results

       2 files     296 suites   12m 14s ⏱️
   778 tests    776 ✔️ 2 💤 0
4 921 runs  4 919 ✔️ 2 💤 0

Results for commit 4d7939b.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

Copy link
Contributor

@jhogberg jhogberg left a comment

Choose a reason for hiding this comment

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

LGTM

lib/compiler/src/beam_ssa_alias.erl Outdated Show resolved Hide resolved
The implementation of the `beam_ssa_alias` pass in OTP 26 can become
extremly slow for modules containing huge functions. The `master`
branch (for the OTP 27 release next year) already contains a much
better implementation that handles huge functions. That implementation
is also very different, so we don't want to back-port it to OTP 26.

To make the compiler in OTP 26 usable for huge functions, add a
heuristic that disables the alias analysis pass for functions
exceeding a certain number of blocks.

Fixes erlang#7667
@bjorng bjorng force-pushed the bjorn/compiler/fix-alias-pass/GH-7667/OTP-18770 branch from 1edb471 to 4d7939b Compare September 25, 2023 09:52
@bjorng bjorng merged commit a0dd15a into erlang:maint Sep 26, 2023
15 checks passed
@bjorng bjorng deleted the bjorn/compiler/fix-alias-pass/GH-7667/OTP-18770 branch October 4, 2023 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OTP 26.1 get stuck when compiling gun
2 participants