Call.mutate4(inst, CALL, NewArray.getClearResult(inst), new OPT_IntConstantOperand(target.getOffset()), OPT_MethodOperand.STATIC(target), numberElements.copy(), size,
Call.mutate5(inst, CALL, NewArray.getClearResult(inst), new OPT_IntConstantOperand(target.getOffset()), OPT_MethodOperand.STATIC(target), numberElements, width, headerSize,
  public void perform (OPT_IR ir) {    ir.gc.resync(); // resync generation context -- yuck...        OPT_Instruction next;    for (OPT_Instruction inst = ir.firstInstructionInCodeOrder(); 	 inst != null; 	 inst = next) {      next = inst.nextInstructionInCodeOrder();      int opcode = inst.getOpcode();      switch (opcode) {	      case NEW_opcode: { 	OPT_TypeOperand Type = New.getClearType(inst);	VM_Class cls = (VM_Class)Type.getVMType();	OPT_IntConstantOperand hasFinalizer = new OPT_IntConstantOperand(cls.hasFinalizer() ? 1 : 0);	VM_Method callSite = inst.position.getMethod();	OPT_IntConstantOperand allocator = new OPT_IntConstantOperand(MM_Interface.pickAllocator(cls, callSite));	VM_Method target = VM_Entrypoints.resolvedNewScalarMethod;	Call.mutate4(inst, CALL, New.getClearResult(inst), 		     new OPT_IntConstantOperand(target.getOffset()),		     OPT_MethodOperand.STATIC(target),		     new OPT_IntConstantOperand(cls.getInstanceSize()),		     OPT_ConvertToLowLevelIR.getTIB(inst, ir, Type), 		     hasFinalizer,		     allocator);	if (ir.options.INLINE_NEW) {	  if (inst.getBasicBlock().getInfrequent()) container.counter1++;	  container.counter2++;	  if (!ir.options.FREQ_FOCUS_EFFORT || !inst.getBasicBlock().getInfrequent()) {	    inline(inst, ir);	  }	}      }      break;      case NEW_UNRESOLVED_opcode: {	int typeRefId = New.getType(inst).getTypeRef().getId();	VM_Method target = VM_Entrypoints.unresolvedNewScalarMethod;	Call.mutate1(inst, CALL, New.getClearResult(inst), 		     new OPT_IntConstantOperand(target.getOffset()),		     OPT_MethodOperand.STATIC(target),		     new OPT_IntConstantOperand(typeRefId));      }      break;      case NEWARRAY_opcode: {	OPT_TypeOperand Array = NewArray.getClearType(inst);	VM_Array array = (VM_Array)Array.getVMType();	OPT_Operand numberElements = NewArray.getClearSize(inst);	OPT_Operand size = null;	boolean inline = false;	if (numberElements instanceof OPT_RegisterOperand) {	  int width = array.getLogElementSize();	  OPT_RegisterOperand temp = numberElements.asRegister();	  if (width != 0) {	    temp = OPT_ConvertToLowLevelIR.InsertBinary(inst, ir, INT_SHL, 							VM_TypeReference.Int, 							temp, 							new OPT_IntConstantOperand(width));	  }	  size = OPT_ConvertToLowLevelIR.InsertBinary(inst, ir, INT_ADD, 						      VM_TypeReference.Int, temp,						      new OPT_IntConstantOperand(VM_ObjectModel.computeArrayHeaderSize(array)));	} else { 	  inline = true;	  size = new OPT_IntConstantOperand(array.getInstanceSize(numberElements.asIntConstant().value));	}	VM_Method callSite = inst.position.getMethod();	OPT_IntConstantOperand allocator = new OPT_IntConstantOperand(MM_Interface.pickAllocator(array, callSite));	VM_Method target = VM_Entrypoints.resolvedNewArrayMethod;	Call.mutate4(inst, CALL, NewArray.getClearResult(inst),  		     new OPT_IntConstantOperand(target.getOffset()),		     OPT_MethodOperand.STATIC(target),		     numberElements.copy(), 		     size, 		     OPT_ConvertToLowLevelIR.getTIB(inst, ir, Array),		     allocator);	if (inline && ir.options.INLINE_NEW) {	  if (inst.getBasicBlock().getInfrequent()) container.counter1++;	  container.counter2++;	  if (!ir.options.FREQ_FOCUS_EFFORT || !inst.getBasicBlock().getInfrequent()) {	    inline(inst, ir);	  }	}       }      break;      case NEWARRAY_UNRESOLVED_opcode: {	int typeRefId = NewArray.getType(inst).getTypeRef().getId();	OPT_Operand numberElements = NewArray.getClearSize(inst);	VM_Method target = VM_Entrypoints.unresolvedNewArrayMethod;	Call.mutate2(inst, CALL, NewArray.getClearResult(inst), 		     new OPT_IntConstantOperand(target.getOffset()),		     OPT_MethodOperand.STATIC(target),		     numberElements, 		     new OPT_IntConstantOperand(typeRefId));      }      break;      case NEWOBJMULTIARRAY_opcode: {	int typeRefId = NewArray.getType(inst).getTypeRef().getId();	VM_Method target = VM_Entrypoints.optNewArrayArrayMethod;	VM_Method callSite = inst.position.getMethod();	Call.mutate3(inst, CALL, NewArray.getClearResult(inst),		     new OPT_IntConstantOperand(target.getOffset()),		     OPT_MethodOperand.STATIC(target),		     new OPT_IntConstantOperand(callSite.getId()),		     NewArray.getClearSize(inst),		     new OPT_IntConstantOperand(typeRefId));      }      break;	      case ATHROW_opcode: {	VM_Method target = VM_Entrypoints.athrowMethod;	OPT_MethodOperand methodOp = OPT_MethodOperand.STATIC(target);	methodOp.setIsNonReturningCall(true); 	// Record the fact that this is a non-returning call.	Call.mutate1(inst, CALL, null, new OPT_IntConstantOperand(target.getOffset()),		     methodOp, Athrow.getClearValue(inst));      }      break;      case MONITORENTER_opcode: {	if (ir.options.NO_SYNCHRO) {	  inst.remove();	} else {	  OPT_Operand ref = MonitorOp.getClearRef(inst);	  VM_Type refType = ref.getType().peekResolvedType();	  if (refType != null && refType.getThinLockOffset() != -1) {	    VM_Method target = VM_Entrypoints.inlineLockMethod;	    Call.mutate2(inst, CALL, null, new OPT_IntConstantOperand(target.getOffset()),			 OPT_MethodOperand.STATIC(target),			 MonitorOp.getClearGuard(inst), 			 ref,			 new OPT_IntConstantOperand(refType.getThinLockOffset()));	    if (inst.getBasicBlock().getInfrequent()) container.counter1++;	    container.counter2++;            if (!ir.options.FREQ_FOCUS_EFFORT || !inst.getBasicBlock().getInfrequent()) {              inline(inst, ir);            }	  } else {	    VM_Method target = VM_Entrypoints.lockMethod;	    Call.mutate1(inst, CALL, null, new OPT_IntConstantOperand(target.getOffset()), 			 OPT_MethodOperand.STATIC(target),			 MonitorOp.getClearGuard(inst), 			 ref);	  }	}	break;      }      case MONITOREXIT_opcode: {	if (ir.options.NO_SYNCHRO) {	  inst.remove();	} else {	  OPT_Operand ref = MonitorOp.getClearRef(inst);	  VM_Type refType = ref.getType().peekResolvedType();	  if (refType != null && refType.getThinLockOffset() != -1) {	    VM_Method target = VM_Entrypoints.inlineUnlockMethod;	    Call.mutate2(inst, CALL, null, new OPT_IntConstantOperand(target.getOffset()), 			 OPT_MethodOperand.STATIC(target),			 MonitorOp.getClearGuard(inst), 			 ref,			 new OPT_IntConstantOperand(refType.getThinLockOffset()));	    if (inst.getBasicBlock().getInfrequent()) container.counter1++;	    container.counter2++;	    if (!ir.options.FREQ_FOCUS_EFFORT || !inst.getBasicBlock().getInfrequent()) {	      inline(inst, ir);	    }	  } else {	    VM_Method target = VM_Entrypoints.unlockMethod;	    Call.mutate1(inst, CALL, null, new OPT_IntConstantOperand(target.getOffset()),			 OPT_MethodOperand.STATIC(target),			 MonitorOp.getClearGuard(inst), 			 ref);	  }	}       }      break;      case REF_ASTORE_opcode: {	if (MM_Interface.NEEDS_WRITE_BARRIER) {	  VM_Method target = VM_Entrypoints.arrayStoreWriteBarrierMethod;	  OPT_Instruction wb =	    Call.create3(CALL, null, new OPT_IntConstantOperand(target.getOffset()),			 OPT_MethodOperand.STATIC(target),			 AStore.getArray(inst).copy(), 			 AStore.getIndex(inst).copy(), 			 AStore.getValue(inst).copy());	  wb.bcIndex = RUNTIME_SERVICES_BCI;	  wb.position = inst.position;	  inst.replace(wb);	  next = wb.nextInstructionInCodeOrder(); 	  inline(wb, ir, true);	}      }      break;      case PUTFIELD_opcode: {	if (MM_Interface.NEEDS_WRITE_BARRIER) {	  OPT_LocationOperand loc = PutField.getClearLocation(inst);	  VM_FieldReference field = loc.getFieldRef();	  if (!field.getFieldContentsType().isPrimitiveType()) {	    VM_Method target = VM_Entrypoints.putfieldWriteBarrierMethod;	    OPT_Instruction wb = 	      Call.create3(CALL, null, new OPT_IntConstantOperand(target.getOffset()), 			   OPT_MethodOperand.STATIC(target),			   PutField.getRef(inst).copy(), 			   PutField.getOffset(inst).copy(),			   PutField.getValue(inst).copy());	    wb.bcIndex = RUNTIME_SERVICES_BCI;	    wb.position = inst.position;	    inst.replace(wb);	    next = wb.nextInstructionInCodeOrder();	    inline(wb, ir);	  }	}      }      break;	      default:      break;      }    }    // If we actually inlined anything, clean up the mess    if (didSomething) {      branchOpts.perform(ir, true);      _os.perform(ir);    }    // signal that we do not intend to use the gc in other phases anymore.    ir.gc.close();  }