public void removePhiRegister(RegisterSpec registerSpec) {
    ArrayList<Operand> operandsToRemove = new ArrayList<Operand>();
    for (Operand o : operands) {
      if (o.regSpec.getReg() == registerSpec.getReg()) {
        operandsToRemove.add(o);
      }
    }

    operands.removeAll(operandsToRemove);

    // Un-cache sources, in case someone has already called getSources().
    sources = null;
  }
Removes all operand uses of a register from this phi instruction.

@param registerSpec register spec, including type and reg of operand
android/android_framework/dex-maker/src/main/java/com/android/dx/ssa/PhiInsn.java