Lines Matching refs:Ops

107     Constant *Ops = C; // don't take the address of C!
108 return FoldBitCast(ConstantVector::get(Ops), DestTy, TD);
672 static Constant *CastGEPIndices(ArrayRef<Constant *> Ops,
682 for (unsigned i = 1, e = Ops.size(); i != e; ++i) {
685 Ops[0]->getType(),
686 Ops.slice(1, i - 1)))) &&
687 Ops[i]->getType() != IntPtrTy) {
689 NewIdxs.push_back(ConstantExpr::getCast(CastInst::getCastOpcode(Ops[i],
693 Ops[i], IntPtrTy));
695 NewIdxs.push_back(Ops[i]);
701 Constant *C = ConstantExpr::getGetElementPtr(Ops[0], NewIdxs);
728 static Constant *SymbolicallyEvaluateGEP(ArrayRef<Constant *> Ops,
731 Constant *Ptr = Ops[0];
741 for (unsigned i = 1, e = Ops.size(); i != e; ++i)
742 if (!isa<ConstantInt>(Ops[i])) {
746 if (Ops.size() == 2 && ResultElementTy->isIntegerTy(8)) {
747 ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[1]);
767 Ops.data() + 1,
768 Ops.size() - 1)));
930 SmallVector<Constant*, 8> Ops;
940 Ops.push_back(Op);
944 return ConstantFoldCompareInstOperands(CI->getPredicate(), Ops[0], Ops[1],
963 return ConstantFoldInstOperands(I->getOpcode(), I->getType(), Ops, TD, TLI);
970 SmallVector<Constant *, 8> Ops;
980 Ops.push_back(NewC);
984 return ConstantFoldCompareInstOperands(CE->getPredicate(), Ops[0], Ops[1],
986 return ConstantFoldInstOperands(CE->getOpcode(), CE->getType(), Ops, TD, TLI);
1010 ArrayRef<Constant *> Ops,
1015 if (isa<ConstantExpr>(Ops[0]) || isa<ConstantExpr>(Ops[1])) {
1016 if (Constant *C = SymbolicallyEvaluateBinop(Opcode, Ops[0], Ops[1], TD))
1020 return ConstantExpr::get(Opcode, Ops[0], Ops[1]);
1028 if (Function *F = dyn_cast<Function>(Ops.back()))
1030 return ConstantFoldCall(F, Ops.slice(0, Ops.size() - 1), TLI);
1035 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[0])) {
1050 return ConstantExpr::getCast(Opcode, Ops[0], DestTy);
1056 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[0])) {
1070 return ConstantExpr::getCast(Opcode, Ops[0], DestTy);
1081 return ConstantExpr::getCast(Opcode, Ops[0], DestTy);
1084 return FoldBitCast(Ops[0], DestTy, *TD);
1085 return ConstantExpr::getBitCast(Ops[0], DestTy);
1087 return ConstantExpr::getSelect(Ops[0], Ops[1], Ops[2]);
1089 return ConstantExpr::getExtractElement(Ops[0], Ops[1]);
1091 return ConstantExpr::getInsertElement(Ops[0], Ops[1], Ops[2]);
1093 return ConstantExpr::getShuffleVector(Ops[0], Ops[1], Ops[2]);
1095 if (Constant *C = CastGEPIndices(Ops, DestTy, TD, TLI))
1097 if (Constant *C = SymbolicallyEvaluateGEP(Ops, DestTy, TD, TLI))
1100 return ConstantExpr::getGetElementPtr(Ops[0], Ops.slice(1));
1185 Constant *Ops[] = { LHS, RHS };
1186 return ConstantFoldInstOperands(OpC, LHS->getType(), Ops, TD, TLI);
1687 Constant *Ops[] = {
1691 return ConstantStruct::get(cast<StructType>(Ty), Ops);