diff options
author | Björn Gustavsson <[email protected]> | 2018-01-31 07:22:24 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2018-02-14 08:33:25 +0100 |
commit | 260d530946fd3eb2e2d7e74465a5095d35822128 (patch) | |
tree | 8b1b99aa283e434ad2c56d325d83717230be2381 /lib/compiler/src/beam_flatten.erl | |
parent | 54b76b437c9008b3aedbf3fd75526ad4719bde7d (diff) | |
download | otp-260d530946fd3eb2e2d7e74465a5095d35822128.tar.gz otp-260d530946fd3eb2e2d7e74465a5095d35822128.tar.bz2 otp-260d530946fd3eb2e2d7e74465a5095d35822128.zip |
beam_block: Combine blocks when running beam_block the second time
1a029efd1ad47f started to run the beam_block pass a second time,
but it did not attempt to combine adjacent blocks.
Combining adjacent blocks leads to many more opportunities for
optimizations.
After doing some diffing in generated code, it turns out that
there is no benefit for beam_split to split out line instructions
from blocks. It seems that the only reason it was done was to
slightly simplify the implementation of the no_line_info option
in beam_clean.
Diffstat (limited to 'lib/compiler/src/beam_flatten.erl')
-rw-r--r-- | lib/compiler/src/beam_flatten.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/compiler/src/beam_flatten.erl b/lib/compiler/src/beam_flatten.erl index 4045ab6dc5..c60211f516 100644 --- a/lib/compiler/src/beam_flatten.erl +++ b/lib/compiler/src/beam_flatten.erl @@ -73,7 +73,8 @@ norm({set,[D],[S|Puts],{alloc,R,{put_map,Op,F}}}) -> {put_map,F,Op,S,D,R,{list,Puts}}; norm({set,[],[],remove_message}) -> remove_message; norm({set,[],[],fclearerror}) -> fclearerror; -norm({set,[],[],fcheckerror}) -> {fcheckerror,{f,0}}. +norm({set,[],[],fcheckerror}) -> {fcheckerror,{f,0}}; +norm({set,[],[],{line,_}=Line}) -> Line. norm_allocate({_Zero,nostack,Nh,[]}, Regs) -> [{test_heap,Nh,Regs}]; |