Age | Commit message (Collapse) | Author |
|
* lukas/erts/fix_inet_multitimer_cleanup/OTP-15536:
erts: Fix cleanup of the inet MultiTimer
|
|
Apply type optimizations across local function calls
|
|
This commit lets the type optimization pass work across functions,
tracking return and argument types to eliminate redundant tests.
|
|
This serves as a base for the upcoming module-level type
optimization, but may come in handy for other passes like
beam_ssa_funs and beam_ssa_bsm that have their own ad-hoc
implementations.
|
|
Consider this function and its corresponding BEAM code:
foo(Map, Key) ->
Val = case Map of
#{Key:=Val0} -> Val0;
_ -> default
end,
bar(1, 2, Val).
{label,2}.
{test,is_map,{f,3},[{x,0}]}.
{get_map_elements,{f,3},{x,0},{list,[{x,1},{x,0}]}}.
^^^^^
{jump,{f,4}}.
{label,3}.
{move,{atom,default},{x,0}}.
^^^^^
{label,4}.
{move,{integer,2},{x,1}}.
{move,{x,0},{x,2}}.
^^^^^
{move,{integer,1},{x,0}}.
{call_only,3,{f,6}}.
Note that the value of the variable `Val` will first be
placed in `{x,0}` and then moved to `{x,2}` where it needs
to be when calling the `bar/3` function.
The reason for the extra `move` instruction is that the
register allocator picks the lowest numbered available register
when choosing a register to put a variable in. In this case,
`{x,0}` will be chosen.
If we only could give a hint to the register allocator that
it would be better to put `Val` in `{x,2}`, the extra `move`
would disappear:
{label,2}.
{test,is_map,{f,3},[{x,0}]}.
{get_map_elements,{f,3},{x,0},{list,[{x,1},{x,2}]}}.
{jump,{f,4}}.
{label,3}.
{move,{atom,default},{x,2}}.
{label,4}.
{move,{integer,2},{x,1}}.
{move,{integer,1},{x,0}}.
{call_only,3,{f,6}}.
There already is an existing sub pass (`reserve_regs`) in
`beam_ssa_pre_codegen` that among things tries to give the register
allocator hints that some variables should be placed in specific
registers, if possible. However, the existing hinting mechanism is
limited, essentially only working within a single SSA block.
This commit extends the hinting mechanism, allowing hints to be passed
across SSA blocks, eliminating `move` instructions and register
shuffling in many places. (494 modules out of a sample of 1236 modules
were changed by this commit.)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* ingela/inets/httpc-ipv6-brackets/OTP-15544:
inets: httpc - Do not use bracked addresses to gen_tcp or ssl calls
|
|
|
|
Use lists:splitwith/2 instead of lists:partition/2 for splitting out
phi nodes. Since phi nodes are always the first instructions in a
block, the result will be the same, but splitwith/2 is faster.
|
|
|
|
Conflicts:
lib/ssl/src/tls_connection.erl
|
|
* lukas/erts/fix_inet_multitimer_cleanup/OTP-15536:
erts: Fix cleanup of the inet MultiTimer
|
|
* ingela/ssl/continue-optimize/OTP-15445:
ssl: If possible assemble several received application data records
|
|
|
|
* sverker/fix-since-clauses/OTP-15460:
Fix "since" for all multi clause functions
|
|
|
|
Conflicts:
lib/ssl/src/ssl_connection.erl
lib/ssl/src/ssl_connection.hrl
lib/ssl/src/tls_connection.erl
|
|
Specify that mnesia:start/0 is async
|
|
We want to decrease the size of the outer state tuple, and gain
ease of understanding by better grouping. This is the first step
of creating a hs_env (handshake environment) part of the state.
This change will be performed gradually to reduce merge conflicts
complexity and risk of introducing errors.
|
|
|
|
|
|
|
|
* ingela/ssl/test-cuddle:
ssl: Correct test input
|
|
Prior to PR#1807, uncovered lines could be found by searching for "
0.." in the HTML page generated by cover:analyse_to_file/1,2. The pull
request removed the two dots after the number of hits, which makes it
much harder to find the uncovered lines.
This commit introduces a sad face, :-( , instead of the single 0
character, which should make the search easier.
|
|
|
|
|
|
|
|
* siri/logger/erts-and-remote-log-olp:
[logger] Update bench marks to report percent instead of 0.XX
[logger] Minor fix in logger_olp_SUITE to avoid error in end_per_testcase
[logger] Remove info and reset functions from handler modules
[logger] Remove some unused variable warnings
[logger] Store proxy config in logger ets table
[logger] Log mode change and flushes in logger_proxy
[logger] Move out overload protection macros from logger_h_common.hrl
[logger] Allow logger_olp callbacks to return {stop,...}
Add logger_stress_SUITE to benchmarks spec
[logger] Add idle timer in logger_olp
[logger] Use persistent_term for storing proxy reference
Update preloaded
Use system_time instead of monotonic_time in log events
[logger] Add test for restart of logger proxy
[logger] Add API function for configuring logger proxy
[logger] Add logger_stress_SUITE
[logger] Add tests for logger_proxy
[logger] Overload protect logging from erts and remote nodes
[logger] Split overload protection functionality to own module
|
|
If the match instruction was already marked as a skip, we'd ruin
its argument list.
|
|
Add a link on the line number in cover output
OTP-15541
|
|
Fix encrypt_config_file and decrypt_config_file
OTP-15540
|
|
* raimo/stdlib/gen_statem-optimization/OTP-15452:
correct: Work around a compiler mis-optimization
|
|
This was not a compiler optimization that misfired, rather that
the code neede separate case clauses for when the timer was
running and not, so to not call erlang:cancel_timer/1 nor
maps:remove/2 in the case clause where only
a map update was needed before recursion.
See the comment in loop_timouts_cancel/13
|
|
|
|
* ingela/ssl/DES-EDE/OTP-15539:
ssl: Correct 3des_ede_cbc check
|
|
A switch is equivalent to a series of '=:=', so we have to subtract
each value individually from the type. Subtracting a join risks
removing too much type information, and managed to narrow "number"
into "float" in the attached test case.
|
|
|
|
|
|
|
|
|
|
* raimo/stdlib/gen_statem-optimization/OTP-15452:
Write some more comments in the engine loop
Work around a compiler mis-optimization
Move out helper functions to engine loop
Handle #trans_opts{} fields in parse_actions() arguments
Optimize gen_statem engine loop
Modify generic_statem_transit benchmark
|
|
* bjorn/compiler/misc:
beam_ssa_type: Simplify is_singleton_type/1
beam_ssa_opt: Run ssa_opt_tuple_size early
beam_ssa_codegen: Remove forgotten and unreachable clause
beam_ssa_opt: Run the type optimization pass twice
beam_ssa_type: Eliminate redundant 'succeeded' instructions
|
|
* bjorn/compiler/fix-inlined-funs:
sys_core_inline: Kill *all* fun annotations when inlining
|
|
* bjorn/compiler/beam_validator/ERL-832:
Make the beam_validator smarter (again)
|
|
* hasse/fix_calls_to_io_format:
ssh: Adjust some calls to io:format()
xmerl: Adjust a call to io:format()
sasl: Adjust some calls to io:format()
common_test: Adjust some calls to io:format()
|