Lines Matching defs:CP
539 static unsigned getHashValue(const ConstantClass *CP) {
541 return getHashValue(LookupKey(CP->getType(), ValType(CP, Storage)));
614 void remove(ConstantClass *CP) {
615 typename MapTy::iterator I = Map.find(CP);
617 assert(*I == CP && "Didn't find correct element?");
622 ConstantClass *CP, Value *From,
625 LookupKey Key(CP->getType(), ValType(Operands, CP));
635 remove(CP);
637 assert(OperandNo < CP->getNumOperands() && "Invalid index");
638 assert(CP->getOperand(OperandNo) != To && "I didn't contain From!");
639 CP->setOperand(OperandNo, To);
641 for (unsigned I = 0, E = CP->getNumOperands(); I != E; ++I)
642 if (CP->getOperand(I) == From)
643 CP->setOperand(I, To);
645 Map.insert_as(CP, Lookup);