diff options
author | Björn Gustavsson <[email protected]> | 2012-09-03 12:08:40 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2012-10-09 15:24:42 +0200 |
commit | 0772d1063c3e03cfb575fb5e948c120cfee14605 (patch) | |
tree | 90b735d1ef71dea89c935b2b5507bab584f58b9f /lib/compiler/src/beam_bsm.erl | |
parent | ed7ab81375d599c73cbe0d2195102187957c25d6 (diff) | |
download | otp-0772d1063c3e03cfb575fb5e948c120cfee14605.tar.gz otp-0772d1063c3e03cfb575fb5e948c120cfee14605.tar.bz2 otp-0772d1063c3e03cfb575fb5e948c120cfee14605.zip |
Rewrite binary creation instructions to bs_init instructions
Rewrite the five binary creation instructions to a bs_init
instruction, in order to somewhat reduce code bloat.
Diffstat (limited to 'lib/compiler/src/beam_bsm.erl')
-rw-r--r-- | lib/compiler/src/beam_bsm.erl | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/compiler/src/beam_bsm.erl b/lib/compiler/src/beam_bsm.erl index dd3b5f5c04..cfe4af7410 100644 --- a/lib/compiler/src/beam_bsm.erl +++ b/lib/compiler/src/beam_bsm.erl @@ -293,18 +293,8 @@ btb_reaches_match_2([{jump,{f,Lbl}}|_], Regs, #btb{index=Li}=D) -> btb_reaches_match_2(Is, Regs, D); btb_reaches_match_2([{label,_}|Is], Regs, D) -> btb_reaches_match_2(Is, Regs, D); -btb_reaches_match_2([bs_init_writable|Is], Regs0, D) -> - Regs = btb_kill_not_live(0, Regs0), - btb_reaches_match_1(Is, Regs, D); -btb_reaches_match_2([{bs_init2,{f,0},_,_,_,_,Dst}|Is], Regs, D) -> - btb_reaches_match_1(Is, btb_kill([Dst], Regs), D); -btb_reaches_match_2([{bs_init_bits,{f,0},_,_,_,_,Dst}|Is], Regs, D) -> - btb_reaches_match_1(Is, btb_kill([Dst], Regs), D); -btb_reaches_match_2([{bs_append,{f,0},_,_,_,_,Src,_,Dst}=I|Is], Regs, D) -> - btb_ensure_not_used([Src], I, Regs), - btb_reaches_match_1(Is, btb_kill([Dst], Regs), D); -btb_reaches_match_2([{bs_private_append,{f,0},_,_,Src,_,Dst}=I|Is], Regs, D) -> - btb_ensure_not_used([Src], I, Regs), +btb_reaches_match_2([{bs_init,{f,0},_,_,Ss,Dst}=I|Is], Regs, D) -> + btb_ensure_not_used(Ss, I, Regs), btb_reaches_match_1(Is, btb_kill([Dst], Regs), D); btb_reaches_match_2([{bs_put,{f,0},_,Ss}=I|Is], Regs, D) -> btb_ensure_not_used(Ss, I, Regs), |