private boolean setLatticeValueTo(int reg, int value, Constant cst) {
    if (value != CONSTANT) {
      if (latticeValues[reg] != value) {
        latticeValues[reg] = value;
        return true;
      }
      return false;
    } else {
      if (latticeValues[reg] != value || !latticeConstants[reg].equals(cst)) {
        latticeValues[reg] = value;
        latticeConstants[reg] = cst;
        return true;
      }
      return false;
    }
  }
Sets a lattice value for a register to value.

@param reg SSA register
@param value Lattice value
@param cst Constant value (may be null)
@return true if the lattice value changed.
android/android_framework/dex-maker/src/main/java/com/android/dx/ssa/SCCP.java