• Home
  • Raw
  • Download

Lines Matching refs:Ops

102     Constant *Ops = C; // don't take the address of C!  in FoldBitCast()  local
103 return FoldBitCast(ConstantVector::get(Ops), DestTy, TD); in FoldBitCast()
600 static Constant *CastGEPIndices(ArrayRef<Constant *> Ops, in CastGEPIndices() argument
608 for (unsigned i = 1, e = Ops.size(); i != e; ++i) { in CastGEPIndices()
610 !isa<StructType>(GetElementPtrInst::getIndexedType(Ops[0]->getType(), in CastGEPIndices()
611 Ops.slice(1, i-1)))) && in CastGEPIndices()
612 Ops[i]->getType() != IntPtrTy) { in CastGEPIndices()
614 NewIdxs.push_back(ConstantExpr::getCast(CastInst::getCastOpcode(Ops[i], in CastGEPIndices()
618 Ops[i], IntPtrTy)); in CastGEPIndices()
620 NewIdxs.push_back(Ops[i]); in CastGEPIndices()
625 ConstantExpr::getGetElementPtr(Ops[0], NewIdxs); in CastGEPIndices()
650 static Constant *SymbolicallyEvaluateGEP(ArrayRef<Constant *> Ops, in SymbolicallyEvaluateGEP() argument
653 Constant *Ptr = Ops[0]; in SymbolicallyEvaluateGEP()
662 for (unsigned i = 1, e = Ops.size(); i != e; ++i) in SymbolicallyEvaluateGEP()
663 if (!isa<ConstantInt>(Ops[i])) { in SymbolicallyEvaluateGEP()
667 if (Ops.size() == 2 && in SymbolicallyEvaluateGEP()
669 ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[1]); in SymbolicallyEvaluateGEP()
689 Ops.data() + 1, in SymbolicallyEvaluateGEP()
690 Ops.size() - 1))); in SymbolicallyEvaluateGEP()
850 SmallVector<Constant*, 8> Ops; in ConstantFoldInstruction() local
860 Ops.push_back(Op); in ConstantFoldInstruction()
864 return ConstantFoldCompareInstOperands(CI->getPredicate(), Ops[0], Ops[1], in ConstantFoldInstruction()
881 return ConstantFoldInstOperands(I->getOpcode(), I->getType(), Ops, TD, TLI); in ConstantFoldInstruction()
888 SmallVector<Constant *, 8> Ops; in ConstantFoldConstantExpressionImpl() local
898 Ops.push_back(NewC); in ConstantFoldConstantExpressionImpl()
902 return ConstantFoldCompareInstOperands(CE->getPredicate(), Ops[0], Ops[1], in ConstantFoldConstantExpressionImpl()
904 return ConstantFoldInstOperands(CE->getOpcode(), CE->getType(), Ops, TD, TLI); in ConstantFoldConstantExpressionImpl()
928 ArrayRef<Constant *> Ops, in ConstantFoldInstOperands() argument
933 if (isa<ConstantExpr>(Ops[0]) || isa<ConstantExpr>(Ops[1])) in ConstantFoldInstOperands()
934 if (Constant *C = SymbolicallyEvaluateBinop(Opcode, Ops[0], Ops[1], TD)) in ConstantFoldInstOperands()
937 return ConstantExpr::get(Opcode, Ops[0], Ops[1]); in ConstantFoldInstOperands()
945 if (Function *F = dyn_cast<Function>(Ops.back())) in ConstantFoldInstOperands()
947 return ConstantFoldCall(F, Ops.slice(0, Ops.size() - 1), TLI); in ConstantFoldInstOperands()
952 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[0])) { in ConstantFoldInstOperands()
966 return ConstantExpr::getCast(Opcode, Ops[0], DestTy); in ConstantFoldInstOperands()
971 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[0])) in ConstantFoldInstOperands()
977 return ConstantExpr::getCast(Opcode, Ops[0], DestTy); in ConstantFoldInstOperands()
987 return ConstantExpr::getCast(Opcode, Ops[0], DestTy); in ConstantFoldInstOperands()
990 return FoldBitCast(Ops[0], DestTy, *TD); in ConstantFoldInstOperands()
991 return ConstantExpr::getBitCast(Ops[0], DestTy); in ConstantFoldInstOperands()
993 return ConstantExpr::getSelect(Ops[0], Ops[1], Ops[2]); in ConstantFoldInstOperands()
995 return ConstantExpr::getExtractElement(Ops[0], Ops[1]); in ConstantFoldInstOperands()
997 return ConstantExpr::getInsertElement(Ops[0], Ops[1], Ops[2]); in ConstantFoldInstOperands()
999 return ConstantExpr::getShuffleVector(Ops[0], Ops[1], Ops[2]); in ConstantFoldInstOperands()
1001 if (Constant *C = CastGEPIndices(Ops, DestTy, TD, TLI)) in ConstantFoldInstOperands()
1003 if (Constant *C = SymbolicallyEvaluateGEP(Ops, DestTy, TD, TLI)) in ConstantFoldInstOperands()
1006 return ConstantExpr::getGetElementPtr(Ops[0], Ops.slice(1)); in ConstantFoldInstOperands()
1083 Constant *Ops[] = { LHS, RHS }; in ConstantFoldCompareInstOperands() local
1084 return ConstantFoldInstOperands(OpC, LHS->getType(), Ops, TD, TLI); in ConstantFoldCompareInstOperands()
1568 Constant *Ops[] = { in ConstantFoldCall() local
1572 return ConstantStruct::get(cast<StructType>(F->getReturnType()), Ops); in ConstantFoldCall()