Lines Matching refs:Ops
107 Constant *Ops = C; // don't take the address of C! in FoldBitCast() local
108 return FoldBitCast(ConstantVector::get(Ops), DestTy, DL); in FoldBitCast()
674 static Constant *CastGEPIndices(Type *SrcTy, ArrayRef<Constant *> Ops, in CastGEPIndices() argument
681 for (unsigned i = 1, e = Ops.size(); i != e; ++i) { in CastGEPIndices()
684 cast<PointerType>(Ops[0]->getType()->getScalarType()) in CastGEPIndices()
686 Ops.slice(1, i - 1)))) && in CastGEPIndices()
687 Ops[i]->getType() != IntPtrTy) { in CastGEPIndices()
689 NewIdxs.push_back(ConstantExpr::getCast(CastInst::getCastOpcode(Ops[i], in CastGEPIndices()
693 Ops[i], IntPtrTy)); in CastGEPIndices()
695 NewIdxs.push_back(Ops[i]); in CastGEPIndices()
701 Constant *C = ConstantExpr::getGetElementPtr(SrcTy, Ops[0], NewIdxs); in CastGEPIndices()
727 static Constant *SymbolicallyEvaluateGEP(Type *SrcTy, ArrayRef<Constant *> Ops, in SymbolicallyEvaluateGEP() argument
730 Constant *Ptr = Ops[0]; in SymbolicallyEvaluateGEP()
740 for (unsigned i = 1, e = Ops.size(); i != e; ++i) in SymbolicallyEvaluateGEP()
741 if (!isa<ConstantInt>(Ops[i])) { in SymbolicallyEvaluateGEP()
745 if (Ops.size() == 2 && ResultElementTy->isIntegerTy(8)) { in SymbolicallyEvaluateGEP()
746 ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[1]); in SymbolicallyEvaluateGEP()
767 makeArrayRef((Value * const *)Ops.data() + 1, Ops.size() - 1))); in SymbolicallyEvaluateGEP()
927 SmallVector<Constant*, 8> Ops; in ConstantFoldInstruction() local
937 Ops.push_back(Op); in ConstantFoldInstruction()
941 return ConstantFoldCompareInstOperands(CI->getPredicate(), Ops[0], Ops[1], in ConstantFoldInstruction()
960 return ConstantFoldInstOperands(I->getOpcode(), I->getType(), Ops, DL, TLI); in ConstantFoldInstruction()
967 SmallVector<Constant *, 8> Ops; in ConstantFoldConstantExpressionImpl() local
977 Ops.push_back(NewC); in ConstantFoldConstantExpressionImpl()
981 return ConstantFoldCompareInstOperands(CE->getPredicate(), Ops[0], Ops[1], in ConstantFoldConstantExpressionImpl()
983 return ConstantFoldInstOperands(CE->getOpcode(), CE->getType(), Ops, DL, TLI); in ConstantFoldConstantExpressionImpl()
1007 ArrayRef<Constant *> Ops, in ConstantFoldInstOperands() argument
1012 if (isa<ConstantExpr>(Ops[0]) || isa<ConstantExpr>(Ops[1])) { in ConstantFoldInstOperands()
1013 if (Constant *C = SymbolicallyEvaluateBinop(Opcode, Ops[0], Ops[1], DL)) in ConstantFoldInstOperands()
1017 return ConstantExpr::get(Opcode, Ops[0], Ops[1]); in ConstantFoldInstOperands()
1025 if (Function *F = dyn_cast<Function>(Ops.back())) in ConstantFoldInstOperands()
1027 return ConstantFoldCall(F, Ops.slice(0, Ops.size() - 1), TLI); in ConstantFoldInstOperands()
1032 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[0])) { in ConstantFoldInstOperands()
1047 return ConstantExpr::getCast(Opcode, Ops[0], DestTy); in ConstantFoldInstOperands()
1053 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[0])) { in ConstantFoldInstOperands()
1067 return ConstantExpr::getCast(Opcode, Ops[0], DestTy); in ConstantFoldInstOperands()
1078 return ConstantExpr::getCast(Opcode, Ops[0], DestTy); in ConstantFoldInstOperands()
1080 return FoldBitCast(Ops[0], DestTy, DL); in ConstantFoldInstOperands()
1082 return ConstantExpr::getSelect(Ops[0], Ops[1], Ops[2]); in ConstantFoldInstOperands()
1084 return ConstantExpr::getExtractElement(Ops[0], Ops[1]); in ConstantFoldInstOperands()
1086 return ConstantExpr::getInsertElement(Ops[0], Ops[1], Ops[2]); in ConstantFoldInstOperands()
1088 return ConstantExpr::getShuffleVector(Ops[0], Ops[1], Ops[2]); in ConstantFoldInstOperands()
1091 if (Constant *C = CastGEPIndices(SrcTy, Ops, DestTy, DL, TLI)) in ConstantFoldInstOperands()
1093 if (Constant *C = SymbolicallyEvaluateGEP(SrcTy, Ops, DestTy, DL, TLI)) in ConstantFoldInstOperands()
1096 return ConstantExpr::getGetElementPtr(SrcTy, Ops[0], Ops.slice(1)); in ConstantFoldInstOperands()
1177 Constant *Ops[] = { LHS, RHS }; in ConstantFoldCompareInstOperands() local
1178 return ConstantFoldInstOperands(OpC, LHS->getType(), Ops, DL, TLI); in ConstantFoldCompareInstOperands()
1687 Constant *Ops[] = { in ConstantFoldScalarCall() local
1691 return ConstantStruct::get(cast<StructType>(Ty), Ops); in ConstantFoldScalarCall()