Home | History | Annotate | Download | only in Analysis

Lines Matching refs:Value

38 Value *SCEVExpander::ReuseOrCreateCast(Value *V, Type *Ty,
114 Value *SCEVExpander::InsertNoopCastOfTo(Value *V, Type *Ty) {
173 Value *SCEVExpander::InsertBinop(Instruction::BinaryOps Opcode,
174 Value *LHS, Value *RHS) {
188 // Don't count dbg.value against the ScanLimit, to avoid perturbing the
251 // the value at this scale. It will be considered for subsequent
315 // the sum into a single value, so just use that.
387 Value *SCEVExpander::expandAddToGEP(const SCEV *const *op_begin,
391 Value *V) {
394 SmallVector<Value *, 4> GepIndices;
443 Value *Scaled = ScaledOps.empty() ?
500 Value *Idx = expandCodeFor(SE.getAddExpr(Ops), Ty);
516 // Don't count dbg.value against the ScanLimit, to avoid perturbing the
541 Value *GEP = Builder.CreateGEP(Builder.getInt8Ty(), V, Idx, "uglygep");
556 [L](Value *Op) { return !L->isLoopInvariant(Op); });
570 // compute a value which is beyond the end of the allocated object.
571 Value *Casted = V;
574 Value *GEP = Builder.CreateGEP(OriginalElTy, Casted, GepIndices, "scevgep");
670 Value *SCEVExpander::visitAddExpr(const SCEVAddExpr *S) {
688 Value *Sum = nullptr;
722 Value *W = expandCodeFor(SE.getNegativeSCEV(Op), Ty);
728 Value *W = expandCodeFor(Op, Ty);
740 Value *SCEVExpander::visitMulExpr(const SCEVMulExpr *S) {
755 Value *Prod = nullptr;
767 Value *W = expandCodeFor(Op, Ty);
786 Value *SCEVExpander::visitUDivExpr(const SCEVUDivExpr *S) {
789 Value *LHS = expandCodeFor(S->getLHS(), Ty);
797 Value *RHS = expandCodeFor(S->getRHS(), Ty);
912 /// until we reach a value that dominates InsertPos.
963 Value *SCEVExpander::expandIVInc(PHINode *PN, Value *StepV, const Loop *L,
966 Value *IncV;
1171 // Expand code for the start value.
1172 Value *StartV =
1180 // Expand code for the step value. Do this before creating the PHI so that PHI
1190 Value *StepV = expandCodeFor(Step, IntTy, &L->getHeader()->front());
1210 // Add a start value.
1216 // Create a step value and add it to the PHI.
1222 Value *IncV = expandIVInc(PN, StepV, L, ExpandTy, IntTy, useSubtract);
1243 Value *SCEVExpander::expandAddRecExprLiterally(const SCEVAddRecExpr *S) {
1293 Value *Result;
1297 // In PostInc mode, use the post-incremented value.
1313 // expansion with the value of the postinc user. Without fundamentally
1321 Value *StepV;
1376 Value *SCEVExpander::visitAddRecExpr(const SCEVAddRecExpr *S) {
1396 Value *V = expand(SE.getAddRecExpr(NewOps, S->getLoop(),
1421 // or divided pointer value. In those cases, the result type isn't
1424 Value *StartV = expand(Base);
1450 // There must be an incoming value for each predecessor, even the
1510 Value *SCEVExpander::visitTruncateExpr(const SCEVTruncateExpr *S) {
1512 Value *V = expandCodeFor(S->getOperand(),
1514 Value *I = Builder.CreateTrunc(V, Ty);
1519 Value *SCEVExpander::visitZeroExtendExpr(const SCEVZeroExtendExpr *S) {
1521 Value *V = expandCodeFor(S->getOperand(),
1523 Value *I = Builder.CreateZExt(V, Ty);
1528 Value *SCEVExpander::visitSignExtendExpr(const SCEVSignExtendExpr *S) {
1530 Value *V = expandCodeFor(S->getOperand(),
1532 Value *I = Builder.CreateSExt(V, Ty);
1537 Value *SCEVExpander::visitSMaxExpr(const SCEVSMaxExpr *S) {
1538 Value *LHS = expand(S->getOperand(S->getNumOperands()-1));
1547 Value *RHS = expandCodeFor(S->getOperand(i), Ty);
1548 Value *ICmp = Builder.CreateICmpSGT(LHS, RHS);
1550 Value *Sel = Builder.CreateSelect(ICmp, LHS, RHS, "smax");
1561 Value *SCEVExpander::visitUMaxExpr(const SCEVUMaxExpr *S) {
1562 Value *LHS = expand(S->getOperand(S->getNumOperands()-1));
1571 Value *RHS = expandCodeFor(S->getOperand(i), Ty);
1572 Value *ICmp = Builder.CreateICmpUGT(LHS, RHS);
1574 Value *Sel = Builder.CreateSelect(ICmp, LHS, RHS, "umax");
1585 Value *SCEVExpander::expandCodeFor(const SCEV *SH, Type *Ty,
1592 Value *SCEVExpander::expandCodeFor(const SCEV *SH, Type *Ty) {
1594 Value *V = expand(SH);
1603 Value *SCEVExpander::expand(const SCEV *S) {
1615 // block start to simplify value reuse, even though it's an invalid
1642 Value *V = visit(S);
1644 // Remember the expanded value
1646 // This is independent of PostIncLoops. The mapped value simply materializes
1647 // the expression at this insertion point. If the mapped value happened to be
1654 void SCEVExpander::rememberInstruction(Value *I) {
1702 std::sort(Phis.begin(), Phis.end(), [](Value *LHS, Value *RHS) {
1715 auto SimplifyPHINode = [&](PHINode *PN) -> Value * {
1716 if (Value *V = SimplifyInstruction(PN, DL, &SE.TLI, &SE.DT, &SE.AC))
1728 if (Value *V = SimplifyPHINode(Phi)) {
1793 Value *NewInc = OrigInc;
1813 Value *NewIV = OrigPhiRef;
1825 Value *SCEVExpander::findExistingExpansion(const SCEV *S,
1832 // Look for suitable value in simple conditions at the loop exits.
1853 // Can not find suitable value.
1861 // If we can find an existing value for this scev avaliable at the point "At"
1906 // At the beginning of this function we already tried to find existing value
1935 Value *SCEVExpander::expandCodeForPredicate(const SCEVPredicate *Pred,
1947 Value *SCEVExpander::expandEqualPredicate(const SCEVEqualPredicate *Pred,
1949 Value *Expr0 = expandCodeFor(Pred->getLHS(), Pred->getLHS()->getType(), IP);
1950 Value *Expr1 = expandCodeFor(Pred->getRHS(), Pred->getRHS()->getType(), IP);
1957 Value *SCEVExpander::expandUnionPredicate(const SCEVUnionPredicate *Union,
1960 Value *Check = ConstantInt::getNullValue(BoolType);
1974 // that may expand to a !isSafeToSpeculativelyExecute value is unsafe, namely