aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-11-04 11:12:03 +0100
committerBjörn Gustavsson <[email protected]>2011-11-04 11:12:03 +0100
commit841ef48db4b8df0e8a057d5d006e10c3b7e4f325 (patch)
treef4b42bae4b46f0f6cf40c882f910367a419edad4
parent9a6ad15ba103ec7aee2da66f59e371bd863f410c (diff)
downloadotp-841ef48db4b8df0e8a057d5d006e10c3b7e4f325.tar.gz
otp-841ef48db4b8df0e8a057d5d006e10c3b7e4f325.tar.bz2
otp-841ef48db4b8df0e8a057d5d006e10c3b7e4f325.zip
beam_type: Improve FP optimizations in the presence of line numbers
Allow line/1 instructions to be part of a sequence of floating point instructions to avoid outputting fclearerror / fcheckerror around every floating point instruction.
-rw-r--r--lib/compiler/src/beam_type.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/compiler/src/beam_type.erl b/lib/compiler/src/beam_type.erl
index 7fdb8d072a..0c51251f1b 100644
--- a/lib/compiler/src/beam_type.erl
+++ b/lib/compiler/src/beam_type.erl
@@ -168,6 +168,8 @@ simplify_float_1([{set,[D0],[A,B],{alloc,_,{gc_bif,Op0,{f,0}}}}=I|Is]=Is0, Ts0,
simplify_float_1([{set,_,_,{'catch',_}}=I|Is]=Is0, _Ts, Rs0, Acc0) ->
Acc = flush_all(Rs0, Is0, Acc0),
simplify_float_1(Is, tdb_new(), Rs0, [I|Acc]);
+simplify_float_1([{set,_,_,{line,_}}=I|Is], Ts, Rs, Acc) ->
+ simplify_float_1(Is, Ts, Rs, [I|Acc]);
simplify_float_1([I|Is]=Is0, Ts0, Rs0, Acc0) ->
Ts = update(I, Ts0),
{Rs,Acc} = flush(Rs0, Is0, Acc0),