• Home
  • Raw
  • Download

Lines Matching refs:Expr

58   ValidatorResult(SCEVType::TYPE Type, const SCEV *Expr) : Type(Type) {  in ValidatorResult()  argument
59 Parameters.insert(Expr); in ValidatorResult()
149 class ValidatorResult visitZeroExtendOrTruncateExpr(const SCEV *Expr, in visitZeroExtendOrTruncateExpr()
161 return ValidatorResult(SCEVType::PARAM, Expr); in visitZeroExtendOrTruncateExpr()
164 class ValidatorResult visitPtrToIntExpr(const SCEVPtrToIntExpr *Expr) { in visitPtrToIntExpr()
165 return visit(Expr->getOperand()); in visitPtrToIntExpr()
168 class ValidatorResult visitTruncateExpr(const SCEVTruncateExpr *Expr) { in visitTruncateExpr()
169 return visitZeroExtendOrTruncateExpr(Expr, Expr->getOperand()); in visitTruncateExpr()
172 class ValidatorResult visitZeroExtendExpr(const SCEVZeroExtendExpr *Expr) { in visitZeroExtendExpr()
173 return visitZeroExtendOrTruncateExpr(Expr, Expr->getOperand()); in visitZeroExtendExpr()
176 class ValidatorResult visitSignExtendExpr(const SCEVSignExtendExpr *Expr) { in visitSignExtendExpr()
177 return visit(Expr->getOperand()); in visitSignExtendExpr()
180 class ValidatorResult visitAddExpr(const SCEVAddExpr *Expr) { in visitAddExpr()
183 for (int i = 0, e = Expr->getNumOperands(); i < e; ++i) { in visitAddExpr()
184 ValidatorResult Op = visit(Expr->getOperand(i)); in visitAddExpr()
195 class ValidatorResult visitMulExpr(const SCEVMulExpr *Expr) { in visitMulExpr()
200 for (int i = 0, e = Expr->getNumOperands(); i < e; ++i) { in visitMulExpr()
201 ValidatorResult Op = visit(Expr->getOperand(i)); in visitMulExpr()
214 << "\tExpr: " << *Expr << "\n" in visitMulExpr()
216 << "\tNext operand (" << Op << "): " << *Expr->getOperand(i) in visitMulExpr()
226 return ValidatorResult(SCEVType::PARAM, Expr); in visitMulExpr()
231 class ValidatorResult visitAddRecExpr(const SCEVAddRecExpr *Expr) { in visitAddRecExpr()
232 if (!Expr->isAffine()) { in visitAddRecExpr()
237 ValidatorResult Start = visit(Expr->getStart()); in visitAddRecExpr()
238 ValidatorResult Recurrence = visit(Expr->getStepRecurrence(SE)); in visitAddRecExpr()
246 auto *L = Expr->getLoop(); in visitAddRecExpr()
270 if (Expr->getStart()->isZero()) in visitAddRecExpr()
271 return ValidatorResult(SCEVType::PARAM, Expr); in visitAddRecExpr()
276 SE.getConstant(Expr->getStart()->getType(), 0), in visitAddRecExpr()
277 Expr->getStepRecurrence(SE), Expr->getLoop(), Expr->getNoWrapFlags()); in visitAddRecExpr()
286 class ValidatorResult visitSMaxExpr(const SCEVSMaxExpr *Expr) { in visitSMaxExpr()
289 for (int i = 0, e = Expr->getNumOperands(); i < e; ++i) { in visitSMaxExpr()
290 ValidatorResult Op = visit(Expr->getOperand(i)); in visitSMaxExpr()
301 class ValidatorResult visitSMinExpr(const SCEVSMinExpr *Expr) { in visitSMinExpr()
304 for (int i = 0, e = Expr->getNumOperands(); i < e; ++i) { in visitSMinExpr()
305 ValidatorResult Op = visit(Expr->getOperand(i)); in visitSMinExpr()
316 class ValidatorResult visitUMaxExpr(const SCEVUMaxExpr *Expr) { in visitUMaxExpr()
319 for (int i = 0, e = Expr->getNumOperands(); i < e; ++i) { in visitUMaxExpr()
320 ValidatorResult Op = visit(Expr->getOperand(i)); in visitUMaxExpr()
328 return ValidatorResult(SCEVType::PARAM, Expr); in visitUMaxExpr()
331 class ValidatorResult visitUMinExpr(const SCEVUMinExpr *Expr) { in visitUMinExpr()
334 for (int i = 0, e = Expr->getNumOperands(); i < e; ++i) { in visitUMinExpr()
335 ValidatorResult Op = visit(Expr->getOperand(i)); in visitUMinExpr()
343 return ValidatorResult(SCEVType::PARAM, Expr); in visitUMinExpr()
402 ValidatorResult visitUDivExpr(const SCEVUDivExpr *Expr) { in visitUDivExpr()
406 auto *Dividend = Expr->getLHS(); in visitUDivExpr()
407 auto *Divisor = Expr->getRHS(); in visitUDivExpr()
408 return visitDivision(Dividend, Divisor, Expr); in visitUDivExpr()
411 ValidatorResult visitSDivInstruction(Instruction *SDiv, const SCEV *Expr) { in visitSDivInstruction()
417 return visitDivision(Dividend, Divisor, Expr, SDiv); in visitSDivInstruction()
434 ValidatorResult visitUnknown(const SCEVUnknown *Expr) { in visitUnknown()
435 Value *V = Expr->getValue(); in visitUnknown()
437 if (!Expr->getType()->isIntegerTy() && !Expr->getType()->isPointerTy()) { in visitUnknown()
447 if (Instruction *I = dyn_cast<Instruction>(Expr->getValue())) { in visitUnknown()
452 return visitLoadInstruction(I, Expr); in visitUnknown()
454 return visitSDivInstruction(I, Expr); in visitUnknown()
456 return visitSRemInstruction(I, Expr); in visitUnknown()
458 return visitCallInstruction(I, Expr); in visitUnknown()
460 return visitGenericInst(I, Expr); in visitUnknown()
464 return ValidatorResult(SCEVType::PARAM, Expr); in visitUnknown()
573 void findLoops(const SCEV *Expr, SetVector<const Loop *> &Loops) { in findLoops() argument
576 ST.visitAll(Expr); in findLoops()
614 void findValues(const SCEV *Expr, ScalarEvolution &SE, in findValues() argument
618 ST.visitAll(Expr); in findValues()
621 bool hasIVParams(const SCEV *Expr) { in hasIVParams() argument
624 ST.visitAll(Expr); in hasIVParams()
628 bool hasScalarDepsInsideRegion(const SCEV *Expr, const Region *R, in hasScalarDepsInsideRegion() argument
633 ST.visitAll(Expr); in hasScalarDepsInsideRegion()
637 bool isAffineExpr(const Region *R, llvm::Loop *Scope, const SCEV *Expr, in isAffineExpr() argument
639 if (isa<SCEVCouldNotCompute>(Expr)) in isAffineExpr()
645 dbgs() << "Expr: " << *Expr << "\n"; in isAffineExpr()
650 ValidatorResult Result = Validator.visit(Expr); in isAffineExpr()
702 const SCEV *Expr, ScalarEvolution &SE) { in getParamsInAffineExpr() argument
703 if (isa<SCEVCouldNotCompute>(Expr)) in getParamsInAffineExpr()
708 ValidatorResult Result = Validator.visit(Expr); in getParamsInAffineExpr()
774 const SCEV *tryForwardThroughPHI(const SCEV *Expr, Region &R, in tryForwardThroughPHI() argument
777 if (auto *Unknown = dyn_cast<SCEVUnknown>(Expr)) { in tryForwardThroughPHI()
781 return Expr; in tryForwardThroughPHI()
790 return Expr; in tryForwardThroughPHI()
797 return Expr; in tryForwardThroughPHI()