diff options
author | Björn Gustavsson <[email protected]> | 2012-08-31 19:14:10 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2012-10-09 15:24:41 +0200 |
commit | ed7ab81375d599c73cbe0d2195102187957c25d6 (patch) | |
tree | f2e4114919a1e79be55f6171997febf33c0b9f27 /lib/compiler/src/beam_bsm.erl | |
parent | b44f86b779f0b8579e4df2a98930ac3150c6c07c (diff) | |
download | otp-ed7ab81375d599c73cbe0d2195102187957c25d6.tar.gz otp-ed7ab81375d599c73cbe0d2195102187957c25d6.tar.bz2 otp-ed7ab81375d599c73cbe0d2195102187957c25d6.zip |
Rewrite bs_add, bs_utf*_size to BIF instructions in optimizations
We can remove some code bloat by handling the special instructions
as BIF instructions in the optimization passes. Also note that
bs_utf*_size was not handled by beam_utils:check_liveness/3
(meaning the conservative answer instead of the correct answer
would be returned).
Diffstat (limited to 'lib/compiler/src/beam_bsm.erl')
-rw-r--r-- | lib/compiler/src/beam_bsm.erl | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/compiler/src/beam_bsm.erl b/lib/compiler/src/beam_bsm.erl index aaf48d4587..dd3b5f5c04 100644 --- a/lib/compiler/src/beam_bsm.erl +++ b/lib/compiler/src/beam_bsm.erl @@ -293,8 +293,6 @@ 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_add,{f,0},_,Dst}|Is], Regs, D) -> - btb_reaches_match_1(Is, btb_kill([Dst], 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); @@ -311,12 +309,6 @@ btb_reaches_match_2([{bs_private_append,{f,0},_,_,Src,_,Dst}=I|Is], Regs, D) -> btb_reaches_match_2([{bs_put,{f,0},_,Ss}=I|Is], Regs, D) -> btb_ensure_not_used(Ss, I, Regs), btb_reaches_match_1(Is, Regs, D); -btb_reaches_match_2([{bs_utf8_size,_,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_utf16_size,_,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_restore2,Src,_}=I|Is], Regs0, D) -> case btb_contains_context(Src, Regs0) of false -> |