aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/beam_ssa.erl
diff options
context:
space:
mode:
authorJohn Högberg <[email protected]>2018-10-01 15:23:17 +0200
committerJohn Högberg <[email protected]>2018-10-03 13:42:10 +0200
commit31a4c1d65c24d8240d5d46d8cffe81097ebb28bf (patch)
tree39f2593781ab8d9029fe161b0da6bdad5943bdbd /lib/compiler/src/beam_ssa.erl
parent25d15bc981659947899499bbce6040868d73418f (diff)
downloadotp-31a4c1d65c24d8240d5d46d8cffe81097ebb28bf.tar.gz
otp-31a4c1d65c24d8240d5d46d8cffe81097ebb28bf.tar.bz2
otp-31a4c1d65c24d8240d5d46d8cffe81097ebb28bf.zip
Optimize named funs and fun-wrapped macros
If a fun is defined locally and only used for calls, it can be replaced with direct calls to the relevant function. This greatly speeds up "named functions" (which rely on make_fun to recreate themselves) and macros that wrap their body in a fun.
Diffstat (limited to 'lib/compiler/src/beam_ssa.erl')
-rw-r--r--lib/compiler/src/beam_ssa.erl1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/compiler/src/beam_ssa.erl b/lib/compiler/src/beam_ssa.erl
index 1a2e759965..a71802cf80 100644
--- a/lib/compiler/src/beam_ssa.erl
+++ b/lib/compiler/src/beam_ssa.erl
@@ -198,6 +198,7 @@ no_side_effect(#b_set{op=Op}) ->
has_map_field -> true;
is_nonempty_list -> true;
is_tagged_tuple -> true;
+ make_fun -> true;
put_map -> true;
put_list -> true;
put_tuple -> true;