Age | Commit message (Collapse) | Author |
|
`beam_ssa_dead` can waste a lot of time trying to optimize
an unoptimizable `switch` instruction.
By being a little bit smarter when optimizing `switch` instructions,
the runtime for the beam_ssa_dead pass was reduced approximately by
half on my computer for this module:
https://github.com/aggelgian/cuter/blob/master/src/cuter_binlib.erl
Noticed-by: Kostis Sagonas
|
|
The linear scan algorithm keeps unhandled intervals in two separate
lists: one for intervals with reserved registers and one for intervals
without reserved registers. When collecting the available free registers
all unhandled intervals with reserved registers must be checked for
overlap.
Unhandled intervals that had a preferred register were put into the
list of intervals with reserved registers, leading to a lot of
unecessary overlap checking if there were many intervals with
preferred registers. Changing the partition code to put intervals with
preferred registers into the general list of unhandled intervals will
reduce the compilation time if there are many preferred registers.
On my computer, this change reduced the time of the linear scan pass
from about 20 seconds down to about 0.5 seconds for this module:
https://github.com/aggelgian/cuter/blob/master/src/cuter_binlib.erl
Noticed-by: Kostis Sagonas
|
|
The type analysis pass (`beam_ssa_type`) keeps the type information
for all variables that are in scope. For huge functions, the
`join_types/2` function could get really slow when joining two
maps with thousands of variables in each.
Use a conservative approach to discard type information for
variables only used once by a `br` or `switch` in the same
block as the variable is defined in.
This approach reduces the runtime for the `beam_ssa_type` pass
from a few minutes down to few seconds for this module:
https://github.com/aggelgian/cuter/blob/master/src/cuter_binlib.erl
Rejected approach: Calculate liveness information for all variables
and discard type information for any variable that would not be
used again. That turned out to not work because some optimizations
would invalidate the liveness (in particular, substitutions could
lengthen the lifetime for a variable). Trying to update the
liveness information when doing the optimizations would be tricky.
Noticed-by: Kostis Sagonas
|
|
|
|
* ingela/ssl/maint-bench-cuddle:
ssl: Handle unicode ~s -> ~ts
|
|
* maint:
Updated OTP version
Prepare release
Optimize operator '--' and yield on large inputs
|
|
* maint-18:
Updated OTP version
Prepare release
Optimize operator '--' and yield on large inputs
Conflicts:
OTP_VERSION
erts/doc/src/notes.xml
erts/emulator/beam/erl_alloc.types
erts/emulator/beam/erl_bif_lists.c
erts/vsn.mk
lib/stdlib/doc/src/notes.xml
lib/stdlib/vsn.mk
make/otp_version_tickets
otp_versions.table
|
|
|
|
* maint:
Updated OTP version
Prepare release
|
|
* maint-20:
Updated OTP version
Prepare release
|
|
* ingela/ssl/key-derive/OTP-15374:
ssl: Add key derivation functions for TLS-1.3
|
|
|
|
* ingela/ssl/rsa-kex-engine/ERIERL-268/OTP-15420:
ssl: Add engine handling clause to RSA key exchange
|
|
|
|
|
|
|
|
* maint:
ssh: Clear remote user_dir in ssh_compat_SUITE
ssh: Check compatibility with new OpenSSH versions
ssh: Fix documentation for public key in ext_info
ssh: Fix ssh_options checking for ext_info
ssh: Fix SSH_MSG_EXT_INFO bug for OTP SSH as server
ssh: Fix SSH_MSG_EXT_INFO bug for OTP SSH as client
|
|
* hans/ssh/fix_ext_info_doc:
ssh: Fix documentation for public key in ext_info
|
|
|
|
|
|
|
|
* hans/ssh/fix_ext_info/OTP-15413:
ssh: Fix ssh_options checking for ext_info
ssh: Fix SSH_MSG_EXT_INFO bug for OTP SSH as server
ssh: Fix SSH_MSG_EXT_INFO bug for OTP SSH as client
|
|
|
|
* john/erts/OTP-18.3.4/minusminus_trapping/OTP-15371:
Optimize operator '--' and yield on large inputs
|
|
* maint:
Updated OTP version
Prepare release
Optimize operator '--' and yield on large inputs
|
|
* maint-20:
Updated OTP version
Prepare release
Optimize operator '--' and yield on large inputs
Conflicts:
OTP_VERSION
erts/doc/src/notes.xml
erts/emulator/beam/erl_alloc.types
erts/emulator/beam/erl_bif_lists.c
erts/vsn.mk
lib/ssl/doc/src/notes.xml
lib/ssl/vsn.mk
lib/stdlib/doc/src/notes.xml
lib/stdlib/vsn.mk
make/otp_version_tickets
otp_versions.table
|
|
|
|
Clean up the beam_utils module
|
|
|
|
* ingela/ssl/erl-dist/ERL-770/OTP-15418:
ssl: Correct gen_statem return value
|
|
* maint:
ssh: Fix doc error in daemon 'exec' option
|
|
|
|
|
|
* ingela/public-key/more-sha2:
public_key: Add additional ASN-1 definitions for DSA SHA2 support
|
|
A bug for SSH_MSG_EXT_INFO was fixed both for client and server. Before that fix, wrong
option was read for the information sent to the peer.
This commit adapts the option checking so that the correct option now used is available
not only for servers but also for clients.
|
|
* sverker/erts/ordered_set-select-improvements/OTP-15325:
erts: Tidy some ordered_set iteration code
erts: Fix bug for catree iteration
|
|
The wrong set of supported public keys was sent to the client.
|
|
The message could not be received in connected state
|
|
Could cause renegotiation to fail
|
|
* peterdmv/ssl/fix-logging/OTP-15372:
ssl: Fix logging in new sender process
Change-Id: I9e9bfc906dfefb846fe45f80b11d138c415fb61e
|
|
|
|
* maint:
Implement a tab for persistent terms in crashdump viewer
Add tests of persistent terms for crashdump_viewer
Add a persistent term storage
Refactor releasing of literals
Extend the sharing-preserving routines to optionally copy literals
Conflicts:
erts/emulator/Makefile.in
erts/emulator/beam/erl_process_dump.c
erts/preloaded/ebin/erts_internal.beam
erts/preloaded/ebin/init.beam
lib/sasl/src/systools_make.erl
|
|
* bjorn/erts/persistent_terms/OTP-14669:
Implement a tab for persistent terms in crashdump viewer
Add tests of persistent terms for crashdump_viewer
Add a persistent term storage
Refactor releasing of literals
Extend the sharing-preserving routines to optionally copy literals
|
|
Also rename a few functions in attempt to make it clearer.
|
|
Recognize more safe labels to enable stack trimming in more
circumstances.
|
|
|
|
Remove the now unused beam_utils:is_not_used/3 and
beam_utils:is_killed/3 functions and friends.
Starting out as simple functions a long time ago, those functions have
grown and grown to support more optimizations. The number of bugs
found and fixed in beam_utils has also grown over time.
|
|
Eliminate the use of beam_utils:is_not_used/3 by implementing a simple
is_not_used() function in beam_trim itself. The new version actually
makes trimming possible in more circumstances, because
beam_utils:is_not_used/3 was too conservative for the purpose of stack
trimming (it was previously used for optimizations where it was
necessary to be more conservative).
Alternatives considered: I tried to implement stack trimming in
beam_ssa_codegen but it turned out to be a total mess. Not
surprisingly, it turns out that an optimization that renumbers
Y registers is hard to do on an intermediate representation that
still use variables instead of BEAM registers.
|
|
Prior to this commit, the optimizations using beam_utils:is_killed/3
were only executed a few times in the entire compiler test suite.
|
|
This will help investigation of compiler bugs.
|