anchor.diff:      end.
   
   %%%
  -%%% Scan instructions in reverse execution order and remove dead code.
  -%%%
  +%%% Scan instructions in reverse execution order and try to
  +%%% shortcut branch instructions.
  +%%%
  +%%% For example, in this code:
  +%%%
  +%%%             move Literal Register
  +%%%             jump L1
  +%%%                .
  +%%%                .
  +%%%                .
  +%%%     L1:     test is_{integer,atom} FailLabel Register
  +%%%             select_val {x,0} FailLabel [... Literal => L2...]
  +%%%                .
  +%%%                .
  +%%%                .
  +%%%     L2:        ...
  +%%%
  +%%% the 'selectval' instruction will always transfer control to L2,
  +%%% so we can just as well jump to L2 directly by rewriting the
  +%%% first part of the sequence like this:
  +%%%
  +%%%           move Literal Register
  +%%%           jump L2
  +%%%
  +%%% If register Register is killed at label L2, we can remove the
  +%%% 'move' instruction, leaving just the 'jump' instruction:
  +%%%
  +%%%           jump L2
  +%%%
  +%%% These transformations may leave parts of the code unreachable.
  +%%% The beam_jump pass will remove the unreachable code.
   
   backward(Is, D) ->
       backward(Is, D, []).
  
positive.code:     end;
  shortcut_boolean_label(To, _, Bool, _) -> {To,Bool}.
  
  replace_comp_op(To, Reg, Op, Ops, D) ->
      False = comp_op_find_shortcut(To, Reg, {atom,false}, D),
      True = comp_op_find_shortcut(To, Reg, {atom,true}, D),
  
negative.code: move_move_into_block([], Acc) -> reverse(Acc).
  
  %%%
  %%% Scan instructions in execution order and remove redundant 'move'
  %%% instructions. 'move' instructions are redundant if we know that
  %%% the register already contains the value being assigned, as in the
  %%% following code:
  %%%
  %%%           test is_eq_exact SomeLabel Src Dst
  %%%           move Src Dst
  %%%
  %%% or in:
  %%%
  %%%           test is_nil SomeLabel Dst
  %%%           move nil Dst
  %%%
  %%% or in:
  %%%
  %%%           select_val Register FailLabel [... Literal => L1...]
  %%%                      .
  %%%                      .
  %%%                      .
  %%%   L1:     move Literal Register
  %%%
  %%% Also add extra labels to help the second backward pass.
  %%%
  
  forward(Is, Lc) ->
  