• Home
  • Raw
  • Download

Lines Matching refs:Ops

62     Constant *Ops = C; // don't take the address of C!  in FoldBitCast()  local
63 return FoldBitCast(ConstantVector::get(Ops), DestTy, TD); in FoldBitCast()
544 static Constant *CastGEPIndices(ArrayRef<Constant *> Ops, in CastGEPIndices() argument
552 for (unsigned i = 1, e = Ops.size(); i != e; ++i) { in CastGEPIndices()
554 !isa<StructType>(GetElementPtrInst::getIndexedType(Ops[0]->getType(), in CastGEPIndices()
555 Ops.slice(1, i-1)))) && in CastGEPIndices()
556 Ops[i]->getType() != IntPtrTy) { in CastGEPIndices()
558 NewIdxs.push_back(ConstantExpr::getCast(CastInst::getCastOpcode(Ops[i], in CastGEPIndices()
562 Ops[i], IntPtrTy)); in CastGEPIndices()
564 NewIdxs.push_back(Ops[i]); in CastGEPIndices()
569 ConstantExpr::getGetElementPtr(Ops[0], NewIdxs); in CastGEPIndices()
578 static Constant *SymbolicallyEvaluateGEP(ArrayRef<Constant *> Ops, in SymbolicallyEvaluateGEP() argument
581 Constant *Ptr = Ops[0]; in SymbolicallyEvaluateGEP()
589 for (unsigned i = 1, e = Ops.size(); i != e; ++i) in SymbolicallyEvaluateGEP()
590 if (!isa<ConstantInt>(Ops[i])) { in SymbolicallyEvaluateGEP()
594 if (Ops.size() == 2 && in SymbolicallyEvaluateGEP()
596 ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[1]); in SymbolicallyEvaluateGEP()
615 makeArrayRef((Value **)Ops.data() + 1, in SymbolicallyEvaluateGEP()
616 Ops.size() - 1))); in SymbolicallyEvaluateGEP()
759 SmallVector<Constant*, 8> Ops; in ConstantFoldInstruction() local
762 Ops.push_back(Op); in ConstantFoldInstruction()
767 return ConstantFoldCompareInstOperands(CI->getPredicate(), Ops[0], Ops[1], in ConstantFoldInstruction()
784 return ConstantFoldInstOperands(I->getOpcode(), I->getType(), Ops, TD); in ConstantFoldInstruction()
792 SmallVector<Constant*, 8> Ops; in ConstantFoldConstantExpression() local
799 Ops.push_back(NewC); in ConstantFoldConstantExpression()
803 return ConstantFoldCompareInstOperands(CE->getPredicate(), Ops[0], Ops[1], in ConstantFoldConstantExpression()
805 return ConstantFoldInstOperands(CE->getOpcode(), CE->getType(), Ops, TD); in ConstantFoldConstantExpression()
819 ArrayRef<Constant *> Ops, in ConstantFoldInstOperands() argument
823 if (isa<ConstantExpr>(Ops[0]) || isa<ConstantExpr>(Ops[1])) in ConstantFoldInstOperands()
824 if (Constant *C = SymbolicallyEvaluateBinop(Opcode, Ops[0], Ops[1], TD)) in ConstantFoldInstOperands()
827 return ConstantExpr::get(Opcode, Ops[0], Ops[1]); in ConstantFoldInstOperands()
835 if (Function *F = dyn_cast<Function>(Ops.back())) in ConstantFoldInstOperands()
837 return ConstantFoldCall(F, Ops.slice(0, Ops.size() - 1)); in ConstantFoldInstOperands()
842 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[0])) { in ConstantFoldInstOperands()
856 return ConstantExpr::getCast(Opcode, Ops[0], DestTy); in ConstantFoldInstOperands()
861 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(Ops[0])) in ConstantFoldInstOperands()
867 return ConstantExpr::getCast(Opcode, Ops[0], DestTy); in ConstantFoldInstOperands()
877 return ConstantExpr::getCast(Opcode, Ops[0], DestTy); in ConstantFoldInstOperands()
880 return FoldBitCast(Ops[0], DestTy, *TD); in ConstantFoldInstOperands()
881 return ConstantExpr::getBitCast(Ops[0], DestTy); in ConstantFoldInstOperands()
883 return ConstantExpr::getSelect(Ops[0], Ops[1], Ops[2]); in ConstantFoldInstOperands()
885 return ConstantExpr::getExtractElement(Ops[0], Ops[1]); in ConstantFoldInstOperands()
887 return ConstantExpr::getInsertElement(Ops[0], Ops[1], Ops[2]); in ConstantFoldInstOperands()
889 return ConstantExpr::getShuffleVector(Ops[0], Ops[1], Ops[2]); in ConstantFoldInstOperands()
891 if (Constant *C = CastGEPIndices(Ops, DestTy, TD)) in ConstantFoldInstOperands()
893 if (Constant *C = SymbolicallyEvaluateGEP(Ops, DestTy, TD)) in ConstantFoldInstOperands()
896 return ConstantExpr::getGetElementPtr(Ops[0], Ops.slice(1)); in ConstantFoldInstOperands()
970 Constant *Ops[] = { LHS, RHS }; in ConstantFoldCompareInstOperands() local
971 return ConstantFoldInstOperands(OpC, LHS->getType(), Ops, TD); in ConstantFoldCompareInstOperands()
1398 Constant *Ops[] = { in ConstantFoldCall() local
1402 return ConstantStruct::get(cast<StructType>(F->getReturnType()), Ops); in ConstantFoldCall()