Inst* OSR::copyInst(Type* type, Inst* oldDef, SsaOpnd* rc, Operation op) { Inst* newDef = 0; SsaOpnd* old = oldDef->getDst()->asSsaOpnd(); if (old->isSsaVarOpnd()) { newDef = createNewVarInst(old, type, oldDef, rc, op); } else { InstFactory& instFactory = irManager.getInstFactory(); OpndManager& opndManager = irManager.getOpndManager(); OpndRenameTable opndRenameTable(mm); newDef = instFactory.clone(oldDef, opndManager, &opndRenameTable); newDef->getDst()->setType(type); newDef->setType(type->tag); } return newDef; }