diff options
author | Björn Gustavsson <[email protected]> | 2011-12-28 12:26:08 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2012-01-11 08:39:57 +0100 |
commit | 74c893f90ffc35c52cb4f9c62130a5b05aed5135 (patch) | |
tree | 527fbad6cb7d743b52906ca0b142d8ddd92d79e2 /lib/compiler/src/v3_codegen.erl | |
parent | 6c9fbc473bb7b5a98f0945678bc47bde39a75e8d (diff) | |
download | otp-74c893f90ffc35c52cb4f9c62130a5b05aed5135.tar.gz otp-74c893f90ffc35c52cb4f9c62130a5b05aed5135.tar.bz2 otp-74c893f90ffc35c52cb4f9c62130a5b05aed5135.zip |
v3_codegen: Eliminate the special case of 'put' without destination
If we let v3_kernel make sure that a 'put' operation always has a
destination register, the special case in v3_codegen is not needed.
Diffstat (limited to 'lib/compiler/src/v3_codegen.erl')
-rw-r--r-- | lib/compiler/src/v3_codegen.erl | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/compiler/src/v3_codegen.erl b/lib/compiler/src/v3_codegen.erl index 6623485609..0b81cb33c9 100644 --- a/lib/compiler/src/v3_codegen.erl +++ b/lib/compiler/src/v3_codegen.erl @@ -1423,20 +1423,7 @@ set_cg([{var,R}], Con, Le, Vdb, Bef, St) -> Other -> [{move,Other,Ret}] end, - {Ais,clear_dead(Int, Le#l.i, Vdb),St}; -set_cg([], {binary,Segs}, Le, Vdb, Bef, St) -> - Fail = {f,St#cg.bfail}, - Target = find_scratch_reg(Bef#sr.reg), - Temp = find_scratch_reg(put_reg(Target, Bef#sr.reg)), - PutCode = cg_bin_put(Segs, Fail, Bef), - MaxRegs = max_reg(Bef#sr.reg), - Code = cg_binary(PutCode, Target, Temp, Fail, MaxRegs, Le#l.a), - Aft = clear_dead(Bef, Le#l.i, Vdb), - {Code,Aft,St}; -set_cg([], _, Le, Vdb, Bef, St) -> - %% This should have been stripped by compiler, just cleanup. - {[],clear_dead(Bef, Le#l.i, Vdb), St}. - + {Ais,clear_dead(Int, Le#l.i, Vdb),St}. %%% %%% Code generation for constructing binaries. |