Lines Matching defs:CP
591 static unsigned getHashValue(const ConstantClass *CP) {
593 return getHashValue(LookupKey(CP->getType(), ValType(CP, Storage)));
666 void remove(ConstantClass *CP) {
667 typename MapTy::iterator I = Map.find(CP);
669 assert(*I == CP && "Didn't find correct element?");
674 ConstantClass *CP, Value *From,
677 LookupKey Key(CP->getType(), ValType(Operands, CP));
687 remove(CP);
689 assert(OperandNo < CP->getNumOperands() && "Invalid index");
690 assert(CP->getOperand(OperandNo) != To && "I didn't contain From!");
691 CP->setOperand(OperandNo, To);
693 for (unsigned I = 0, E = CP->getNumOperands(); I != E; ++I)
694 if (CP->getOperand(I) == From)
695 CP->setOperand(I, To);
697 Map.insert_as(CP, Lookup);