Lines Matching full:iteration
106 "unroll-max-iteration-count-to-analyze", cl::init(10), cl::Hidden,
286 /// each iteration.
293 int Iteration : 30; member
312 return PairInfo::getHashValue({S.I, S.Iteration}); in getHashValue()
317 return PairInfo::isEqual({LHS.I, LHS.Iteration}, {RHS.I, RHS.Iteration}); in isEqual()
350 /// given iteration its condition would be resolved to true, we won't add up the
392 // We track the simplification of each instruction in each iteration. We use in analyzeLoopUnrollCost()
406 auto AddCostRecursively = [&](Instruction &RootI, int Iteration) { in analyzeLoopUnrollCost() argument
407 assert(Iteration >= 0 && "Cannot have a negative iteration!"); in analyzeLoopUnrollCost()
415 for (;; --Iteration) { in analyzeLoopUnrollCost()
419 // InstCostMap only uses I and Iteration as a key, the other two values in analyzeLoopUnrollCost()
421 auto CostIter = InstCostMap.find({I, Iteration, 0, 0}); in analyzeLoopUnrollCost()
440 if (Iteration == 0) in analyzeLoopUnrollCost()
445 // cost worklist for the next iteration (as we count backwards). in analyzeLoopUnrollCost()
464 LLVM_DEBUG(dbgs() << "Adding cost of instruction (iteration " in analyzeLoopUnrollCost()
465 << Iteration << "): "); in analyzeLoopUnrollCost()
471 // to be considered on the next iteration (backwards!). in analyzeLoopUnrollCost()
488 assert(Iteration > 0 && in analyzeLoopUnrollCost()
489 "Cannot track PHI-used values past the first iteration!"); in analyzeLoopUnrollCost()
506 // Simulate execution of each iteration of the loop counting instructions, in analyzeLoopUnrollCost()
510 for (unsigned Iteration = 0; Iteration < TripCount; ++Iteration) { in analyzeLoopUnrollCost() local
511 LLVM_DEBUG(dbgs() << " Analyzing iteration " << Iteration << "\n"); in analyzeLoopUnrollCost()
513 // Prepare for the iteration by collecting any simplified entry or backedge in analyzeLoopUnrollCost()
527 Iteration == 0 ? L->getLoopPreheader() : L->getLoopLatch()); in analyzeLoopUnrollCost()
528 if (Iteration != 0 && SimplifiedValues.count(V)) in analyzeLoopUnrollCost()
533 // Now clear and re-populate the map for the next iteration. in analyzeLoopUnrollCost()
538 UnrolledInstAnalyzer Analyzer(Iteration, SimplifiedValues, SE, L); in analyzeLoopUnrollCost()
563 bool Inserted = InstCostMap.insert({&I, (int)Iteration, in analyzeLoopUnrollCost()
585 AddCostRecursively(I, Iteration); in analyzeLoopUnrollCost()
643 AddCostRecursively(*TI, Iteration); in analyzeLoopUnrollCost()
646 // If we found no optimization opportunities on the first iteration, we in analyzeLoopUnrollCost()
698 // with huge iteration counts, which is a compile time problem even if it's in UnrollCostEstimator()
1250 // on the loop trip count, but an exit at an earlier iteration is still in tryToUnrollLoop()
1306 << " with iteration count " << PP.PeelCount << "!\n"); in tryToUnrollLoop()