OPT_Instruction i = Move.create(moveOp, scalars[index], PutField.getValue(inst));
OPT_Instruction i = Move.create(moveOp, scalars[index].copyRO(), PutField.getClearValue(inst));
  private void scalarReplace (OPT_RegisterOperand use,                               OPT_RegisterOperand[] scalars) {    OPT_Instruction inst = use.instruction;    switch (inst.getOpcode()) {      case PUTFIELD_opcode:        {          VM_FieldReference fr = PutField.getLocation(inst).getFieldRef();          if (VM.VerifyAssertions) VM._assert(fr.isResolved());          VM_Field f = fr.peekResolvedField();          int index = fields.indexOf(f);          VM_TypeReference type = scalars[index].type;          OPT_Operator moveOp = OPT_IRTools.getMoveOp(type);          OPT_Instruction i = Move.create(moveOp, scalars[index],               PutField.getValue(inst));          inst.insertBefore(i);          OPT_DefUse.removeInstructionAndUpdateDU(inst);          OPT_DefUse.updateDUForNewInstruction(i);        }        break;      case GETFIELD_opcode:        {          VM_FieldReference fr = GetField.getLocation(inst).getFieldRef();          if (VM.VerifyAssertions) VM._assert(fr.isResolved());          VM_Field f = fr.peekResolvedField();          int index = fields.indexOf(f);          VM_TypeReference type = scalars[index].type;          OPT_Operator moveOp = OPT_IRTools.getMoveOp(type);          OPT_Instruction i = Move.create(moveOp, GetField.getClearResult(inst),               scalars[index]);          inst.insertBefore(i);          OPT_DefUse.removeInstructionAndUpdateDU(inst);          OPT_DefUse.updateDUForNewInstruction(i);        }        break;      case MONITORENTER_opcode:        if (ir.options.NO_CACHE_FLUSH)          OPT_DefUse.removeInstructionAndUpdateDU(inst);         else {          inst.insertBefore(Empty.create(READ_CEILING));          OPT_DefUse.removeInstructionAndUpdateDU(inst);        }        break;      case MONITOREXIT_opcode:        if (ir.options.NO_CACHE_FLUSH)          OPT_DefUse.removeInstructionAndUpdateDU(inst);         else {          inst.insertBefore(Empty.create(WRITE_FLOOR));          OPT_DefUse.removeInstructionAndUpdateDU(inst);        }        break;      case NULL_CHECK_opcode:        // (SJF) TODO: Why wasn't this caught by BC2IR for        //      java.lang.Double.<init> (Ljava/lang/String;)V ?        OPT_DefUse.removeInstructionAndUpdateDU(inst);        break;      default:        throw  new OPT_OptimizingCompilerException(            "OPT_ObjectReplacer: unexpected use "            + inst);    }  }