aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/compile.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2018-01-12 10:36:42 +0100
committerGitHub <[email protected]>2018-01-12 10:36:42 +0100
commitb4801ca7a48521b51e85e8013aad4570cb3ac25a (patch)
tree4469b0f35b08e76b2e8de7d42df142ca19231d11 /lib/compiler/src/compile.erl
parentacb89a005be9be44a33dd3ce381a334299a1f3a4 (diff)
parent1a029efd1ad47f5736faa7f7be6780b649a8b257 (diff)
downloadotp-b4801ca7a48521b51e85e8013aad4570cb3ac25a.tar.gz
otp-b4801ca7a48521b51e85e8013aad4570cb3ac25a.tar.bz2
otp-b4801ca7a48521b51e85e8013aad4570cb3ac25a.zip
Merge pull request #1680 from bjorng/bjorn/compiler/beam_block
Run beam_block a second time
Diffstat (limited to 'lib/compiler/src/compile.erl')
-rw-r--r--lib/compiler/src/compile.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl
index 770aa2c6c1..1409c358c2 100644
--- a/lib/compiler/src/compile.erl
+++ b/lib/compiler/src/compile.erl
@@ -775,6 +775,8 @@ asm_passes() ->
{iff,drecv,{listing,"recv"}},
{unless,no_record_opt,{pass,beam_record}},
{iff,drecord,{listing,"record"}},
+ {unless,no_blk2,?pass(block2)},
+ {iff,dblk2,{listing,"block2"}},
{unless,no_stack_trimming,{pass,beam_trim}},
{iff,dtrim,{listing,"trim"}},
{pass,beam_flatten}]},
@@ -1350,6 +1352,10 @@ v3_kernel(Code0, #compile{options=Opts,warnings=Ws0}=St) ->
{ok,Code,St}
end.
+block2(Code0, #compile{options=Opts}=St) ->
+ {ok,Code} = beam_block:module(Code0, [no_blockify|Opts]),
+ {ok,Code,St}.
+
test_old_inliner(#compile{options=Opts}) ->
%% The point of this test is to avoid loading the old inliner
%% if we know that it will not be used.