anchor.diff:             && instruction.usedBy.isEmpty
              && instruction is !HTypeGuard
              && instruction is !HParameterValue
  -           && instruction is !HLocalSet
  -           && !instruction.isControlFlow();
  +           && instruction is !HLocalSet;
     }
   
     void visitGraph(HGraph graph) {
  +    liveBlocks = computeLiveBlocks(graph);
       visitPostDominatorTree(graph);
     }
   
  +  static Set<HBasicBlock> computeLiveBlocks(HGraph graph) {
  +    Set<HBasicBlock> live = new Set<HBasicBlock>();
  +    List<HBasicBlock> worklist = <HBasicBlock>[];
  +    void process(HBasicBlock block) {
  +      if (!live.contains(block)) {
  +        worklist.add(block);
  +        live.add(block);
  +      }
  +    }
  +
  +    process(graph.entry);
  +    while (!worklist.isEmpty) {
  +      HBasicBlock current = worklist.removeLast();
  +      current.successors.forEach(process);
  +    }
  +    return live;
  +  }
  +
     void visitBasicBlock(HBasicBlock block) {
  -    HInstruction instruction = block.last;
  +    // TODO(kasperl): Use the dead block information to
  +    // remove entire dead blocks of code.
  +    bool isDeadBlock = !liveBlocks.contains(block);
  +    // Start from the last non-control flow instruction in
  +    // the block.
  +    HInstruction instruction = block.last.previous;
       while (instruction != null) {
         var previous = instruction.previous;
         if (isDeadCode(instruction)) block.remove(instruction);
  
positive.code:     return (combinedType == value.instructionType) ? value : node;
    }
  
    HInstruction visitIf(HIf node) {
      HInstruction condition = node.condition;
      if (condition.isConstant()) return node;
      bool isNegated = condition is HNot;
      if (isNegated) condition = condition.inputs[0];
  
      condition.dominatedUsers(node.thenBlock.first).forEach((user) {
        HInstruction newCondition = graph.addConstantBool(!isNegated, compiler);
        user.changeUse(condition, newCondition);
      });
      condition.dominatedUsers(node.elseBlock.first).forEach((user) {
        HInstruction newCondition = graph.addConstantBool(isNegated, compiler);
        user.changeUse(condition, newCondition);
      });
      return node;
    }
  
  
negative.code: class SsaDeadCodeEliminator extends HGraphVisitor implements OptimizationPhase {
    final String name = "SsaDeadCodeEliminator";
  
    Set<HBasicBlock> liveBlocks;
    SsaDeadCodeEliminator();
  
    bool isDeadCode(HInstruction instruction) {
  