private boolean isSideEffect(Instruction instruction, DfaMemoryState memState) {
      if (instruction instanceof FlushFieldsInstruction || instruction instanceof ThrowInstruction) {
        return true;
      }
      if (instruction instanceof FlushVariableInstruction) {
        return !isModificationAllowed(((FlushVariableInstruction)instruction).getVariable());
      }
      if (instruction instanceof AssignInstruction) {
        return !isModificationAllowed(memState.getStackValue(1));
      }
      if (instruction instanceof ReturnInstruction) {
        return ((ReturnInstruction)instruction).getAnchor() != null;
      }
      if (instruction instanceof MethodCallInstruction) {
        return !((MethodCallInstruction)instruction).getMutationSignature().isPure();
      }
      if (instruction instanceof ArrayStoreInstruction) {
        return true;
      }
      return false;
    }
private boolean isSideEffect(Instruction instruction, DfaMemoryState memState)