diff options
author | Björn Gustavsson <[email protected]> | 2015-03-16 12:18:39 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-03-16 12:18:39 +0100 |
commit | 2617c55b3a4ef635812df7cb62f6710b235ad9ef (patch) | |
tree | d2767561f112ab70da883c28b1ef3398fe07fbd1 /lib/compiler/src/beam_block.erl | |
parent | f1da7597dec858ee26dc68a6da66eb62742f82bb (diff) | |
parent | b4061dfd6ef6f84379fd8a0988eed79cb0bb1972 (diff) | |
download | otp-2617c55b3a4ef635812df7cb62f6710b235ad9ef.tar.gz otp-2617c55b3a4ef635812df7cb62f6710b235ad9ef.tar.bz2 otp-2617c55b3a4ef635812df7cb62f6710b235ad9ef.zip |
Merge branch 'bjorn/compiler/optimizations'
* bjorn/compiler/optimizations:
v3_life: Combine literal/2 and literal2/2
v3_codegen: Don't save options in the process dictionary
Don't inline core_parse
v3_core: Teach pat_alias/2 to eliminate duplicated variables
beam_dead: Improve optimization by eliminating fallthroughs
beam_dead: Optimize Var =:= Var
beam_peep: Optimize away redundant use of is_boolean tests
beam_bool: Correct initialized_regs/2
sys_core_fold: Generalize case optimization
sys_core_fold: Improve optimization of 'not'
sys_core_fold: Suppress compiler warnings when evaluating element/2
Clean up evaluation of setelement/3
Replace '==' with '=:=' when both operands are integers
Update type information based on BIFs that returns integers
sys_core_fold: Strengthen type optimization in lets
Diffstat (limited to 'lib/compiler/src/beam_block.erl')
-rw-r--r-- | lib/compiler/src/beam_block.erl | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/lib/compiler/src/beam_block.erl b/lib/compiler/src/beam_block.erl index 92f09e400c..5216f39296 100644 --- a/lib/compiler/src/beam_block.erl +++ b/lib/compiler/src/beam_block.erl @@ -252,13 +252,6 @@ combine_alloc({_,Ns,Nh1,Init}, {_,nostack,Nh2,[]}) -> %% opt([Instruction]) -> [Instruction] %% Optimize the instruction stream inside a basic block. -opt([{set,[Dst],As,{bif,Bif,Fail}}=I1, - {set,[Dst],[Dst],{bif,'not',Fail}}=I2|Is]) -> - %% Get rid of the 'not' if the operation can be inverted. - case inverse_comp_op(Bif) of - none -> [I1,I2|opt(Is)]; - RevBif -> [{set,[Dst],As,{bif,RevBif,Fail}}|opt(Is)] - end; opt([{set,[X],[X],move}|Is]) -> opt(Is); opt([{set,_,_,{line,_}}=Line1, {set,[D1],[{integer,Idx1},Reg],{bif,element,{f,0}}}=I1, @@ -428,18 +421,6 @@ x_live([{x,N}|Rs], Regs) -> x_live(Rs, Regs bor (1 bsl N)); x_live([_|Rs], Regs) -> x_live(Rs, Regs); x_live([], Regs) -> Regs. -%% inverse_comp_op(Op) -> none|RevOp - -inverse_comp_op('=:=') -> '=/='; -inverse_comp_op('=/=') -> '=:='; -inverse_comp_op('==') -> '/='; -inverse_comp_op('/=') -> '=='; -inverse_comp_op('>') -> '=<'; -inverse_comp_op('<') -> '>='; -inverse_comp_op('>=') -> '<'; -inverse_comp_op('=<') -> '>'; -inverse_comp_op(_) -> none. - %%% %%% Evaluation of constant bit fields. %%% |