Home | History | Annotate | Download | only in Analysis

Lines Matching defs:Ops

101     Constant *Ops = C; // don't take the address of C!
102 return FoldBitCast(ConstantVector::get(Ops), DestTy, TD);
599 static Constant *CastGEPIndices(ArrayRef<Constant *> Ops,
607 for (unsigned i = 1, e = Ops.size(); i != e; ++i) {
609 !isa<StructType>(GetElementPtrInst::getIndexedType(Ops[0]->getType(),
610 Ops.slice(1, i-1)))) &&
611 Ops[i]->getType() != IntPtrTy) {
613 NewIdxs.push_back(ConstantExpr::getCast(CastInst::getCastOpcode(Ops[i],
617 Ops[i], IntPtrTy));
619 NewIdxs.push_back(Ops[i]);
624 ConstantExpr::getGetElementPtr(Ops[0], NewIdxs);
649 static Constant *SymbolicallyEvaluateGEP(ArrayRef<Constant *> Ops,
652 Constant *Ptr = Ops[0];
661 for (unsigned i = 1, e = Ops.size(); i != e; ++i)
662 if (!isa<ConstantInt>(Ops[i])) {
666 if (Ops.size() == 2 &&
668 ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[1]);
688 Ops.data() + 1,
689 Ops.size() - 1)));
849 SmallVector<Constant*, 8> Ops;
859 Ops.push_back(Op);
863 return ConstantFoldCompareInstOperands(CI->getPredicate(), Ops[0], Ops[1],
880 return ConstantFoldInstOperands(I->getOpcode(), I->getType(), Ops, TD, TLI);
889 SmallVector<Constant*, 8> Ops;
896 Ops.push_back(NewC);
900 return ConstantFoldCompareInstOperands(CE->getPredicate(), Ops[0], Ops[1],
902 return ConstantFoldInstOperands(CE->getOpcode(), CE->getType(), Ops, TD, TLI);
916 ArrayRef<Constant *> Ops,
921 if (isa<ConstantExpr>(Ops[0]) || isa<ConstantExpr>(Ops[1]))
922 if (Constant *C = SymbolicallyEvaluateBinop(Opcode, Ops[0], Ops[1], TD))
925 return ConstantExpr::get(Opcode, Ops[0], Ops[1]);
933 if (Function *F = dyn_cast<Function>(Ops.back()))
935 return ConstantFoldCall(F, Ops.slice(0, Ops.size() - 1), TLI);
940 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[0])) {
954 return ConstantExpr::getCast(Opcode, Ops[0], DestTy);
959 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[0]))
965 return ConstantExpr::getCast(Opcode, Ops[0], DestTy);
975 return ConstantExpr::getCast(Opcode, Ops[0], DestTy);
978 return FoldBitCast(Ops[0], DestTy, *TD);
979 return ConstantExpr::getBitCast(Ops[0], DestTy);
981 return ConstantExpr::getSelect(Ops[0], Ops[1], Ops[2]);
983 return ConstantExpr::getExtractElement(Ops[0], Ops[1]);
985 return ConstantExpr::getInsertElement(Ops[0], Ops[1], Ops[2]);
987 return ConstantExpr::getShuffleVector(Ops[0], Ops[1], Ops[2]);
989 if (Constant *C = CastGEPIndices(Ops, DestTy, TD, TLI))
991 if (Constant *C = SymbolicallyEvaluateGEP(Ops, DestTy, TD, TLI))
994 return ConstantExpr::getGetElementPtr(Ops[0], Ops.slice(1));
1071 Constant *Ops[] = { LHS, RHS };
1072 return ConstantFoldInstOperands(OpC, LHS->getType(), Ops, TD, TLI);
1556 Constant *Ops[] = {
1560 return ConstantStruct::get(cast<StructType>(F->getReturnType()), Ops);