Lines Matching defs:CE

61   static bool classof(const ConstantExpr *CE) {
62 return Instruction::isCast(CE->getOpcode());
90 static bool classof(const ConstantExpr *CE) {
91 return Instruction::isBinaryOp(CE->getOpcode());
119 static bool classof(const ConstantExpr *CE) {
120 return CE->getOpcode() == Instruction::ExtractElement;
148 static bool classof(const ConstantExpr *CE) {
149 return CE->getOpcode() == Instruction::InsertElement;
186 static bool classof(const ConstantExpr *CE) {
187 return CE->getOpcode() == Instruction::ShuffleVector;
225 static bool classof(const ConstantExpr *CE) {
226 return CE->getOpcode() == Instruction::GetElementPtr;
398 static ArrayRef<int> getShuffleMaskIfValid(const ConstantExpr *CE) {
399 if (CE->getOpcode() == Instruction::ShuffleVector)
400 return CE->getShuffleMask();
404 static Type *getSourceElementTypeIfValid(const ConstantExpr *CE) {
405 if (auto *GEPCE = dyn_cast<GetElementPtrConstantExpr>(CE))
411 getInRangeIfValid(const ConstantExpr *CE) {
412 if (auto *GEPCE = dyn_cast<GetElementPtrConstantExpr>(CE))
427 ConstantExprKeyType(ArrayRef<Constant *> Operands, const ConstantExpr *CE)
428 : Opcode(CE->getOpcode()),
429 SubclassOptionalData(CE->getRawSubclassOptionalData()), Ops(Operands),
430 ShuffleMask(getShuffleMaskIfValid(CE)),
431 ExplicitTy(getSourceElementTypeIfValid(CE)),
432 InRange(getInRangeIfValid(CE)) {}
434 ConstantExprKeyType(const ConstantExpr *CE,
436 : Opcode(CE->getOpcode()),
437 SubclassOptionalData(CE->getRawSubclassOptionalData()),
438 ShuffleMask(getShuffleMaskIfValid(CE)),
439 ExplicitTy(getSourceElementTypeIfValid(CE)),
440 InRange(getInRangeIfValid(CE)) {
442 for (unsigned I = 0, E = CE->getNumOperands(); I != E; ++I)
443 Storage.push_back(CE->getOperand(I));
461 bool operator==(const ConstantExpr *CE) const {
462 if (Opcode != CE->getOpcode())
464 if (SubclassOptionalData != CE->getRawSubclassOptionalData())
466 if (Ops.size() != CE->getNumOperands())
469 if (Ops[I] != CE->getOperand(I))
471 if (ShuffleMask != getShuffleMaskIfValid(CE))
473 if (ExplicitTy != getSourceElementTypeIfValid(CE))
475 if (!rangesEqual(InRange, getInRangeIfValid(CE)))