diff options
author | Björn Gustavsson <[email protected]> | 2015-08-05 19:19:56 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-08-21 15:56:14 +0200 |
commit | 30cc5c902d9e653d48452a7f84fcd664cfc3f0a8 (patch) | |
tree | ed5fdd76bb7ce60315e5614a09df4f5903021085 /lib/compiler/src/beam_split.erl | |
parent | 3640e5c89bda0ca45b3320e8a00efb48b9d9f531 (diff) | |
download | otp-30cc5c902d9e653d48452a7f84fcd664cfc3f0a8.tar.gz otp-30cc5c902d9e653d48452a7f84fcd664cfc3f0a8.tar.bz2 otp-30cc5c902d9e653d48452a7f84fcd664cfc3f0a8.zip |
Put 'try' in blocks to optimize allocation instructions
Put 'try' instructions inside block to improve the optimization
of allocation instructions. Currently, the compiler only looks
at initialization of y registers inside blocks when determining
which y registers that will be "naturally" initialized.
Diffstat (limited to 'lib/compiler/src/beam_split.erl')
-rw-r--r-- | lib/compiler/src/beam_split.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compiler/src/beam_split.erl b/lib/compiler/src/beam_split.erl index 3be9311080..bb1c0e23a9 100644 --- a/lib/compiler/src/beam_split.erl +++ b/lib/compiler/src/beam_split.erl @@ -57,8 +57,8 @@ split_block([{set,[D],[S|Puts],{alloc,R,{put_map,Op,{f,Lbl}=Fail}}}|Is], split_block([{set,Ds,[S|Ss],{get_map_elements,Fail}}|Is], Bl, Acc) -> Gets = beam_utils:join_even(Ss,Ds), split_block(Is, [], [{get_map_elements,Fail,S,{list,Gets}}|make_block(Bl, Acc)]); -split_block([{set,[R],[],{'catch',L}}|Is], Bl, Acc) -> - split_block(Is, [], [{'catch',R,L}|make_block(Bl, Acc)]); +split_block([{set,[R],[],{try_catch,Op,L}}|Is], Bl, Acc) -> + split_block(Is, [], [{Op,R,L}|make_block(Bl, Acc)]); split_block([{set,[],[],{line,_}=Line}|Is], Bl, Acc) -> split_block(Is, [], [Line|make_block(Bl, Acc)]); split_block([I|Is], Bl, Acc) -> |