reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

lib/Transforms/Utils/LoopUnroll.cpp
  350   if (ULO.TripCount != 0)
  351     LLVM_DEBUG(dbgs() << "  Trip Count = " << ULO.TripCount << "\n");
  352   if (ULO.TripMultiple != 1)
  353     LLVM_DEBUG(dbgs() << "  Trip Multiple = " << ULO.TripMultiple << "\n");
  357   if (ULO.TripCount != 0 && ULO.Count > ULO.TripCount)
  357   if (ULO.TripCount != 0 && ULO.Count > ULO.TripCount)
  357   if (ULO.TripCount != 0 && ULO.Count > ULO.TripCount)
  358     ULO.Count = ULO.TripCount;
  358     ULO.Count = ULO.TripCount;
  361   if (ULO.TripCount == 0 && ULO.Count < 2 && ULO.PeelCount == 0) {
  361   if (ULO.TripCount == 0 && ULO.Count < 2 && ULO.PeelCount == 0) {
  361   if (ULO.TripCount == 0 && ULO.Count < 2 && ULO.PeelCount == 0) {
  366   assert(ULO.Count > 0);
  367   assert(ULO.TripMultiple > 0);
  368   assert(ULO.TripCount == 0 || ULO.TripCount % ULO.TripMultiple == 0);
  368   assert(ULO.TripCount == 0 || ULO.TripCount % ULO.TripMultiple == 0);
  368   assert(ULO.TripCount == 0 || ULO.TripCount % ULO.TripMultiple == 0);
  371   bool CompletelyUnroll = ULO.Count == ULO.TripCount;
  371   bool CompletelyUnroll = ULO.Count == ULO.TripCount;
  391       (ULO.TripCount == 0 && ULO.Count > 0 && ULO.AllowRuntime);
  391       (ULO.TripCount == 0 && ULO.Count > 0 && ULO.AllowRuntime);
  391       (ULO.TripCount == 0 && ULO.Count > 0 && ULO.AllowRuntime);
  393   assert((!RuntimeTripCount || !ULO.PeelCount) &&
  398   if (ULO.PeelCount) {
  399     Peeled = peelLoop(L, ULO.PeelCount, LI, SE, DT, AC, PreserveLCSSA);
  411       ULO.TripCount = SE->getSmallConstantTripCount(L, ExitingBlock);
  412       ULO.TripMultiple = SE->getSmallConstantTripMultiple(L, ExitingBlock);
  425         assert((!HasConvergent || ULO.TripMultiple % ULO.Count == 0) &&
  425         assert((!HasConvergent || ULO.TripMultiple % ULO.Count == 0) &&
  434   if (RuntimeTripCount && ULO.TripMultiple % ULO.Count != 0 &&
  434   if (RuntimeTripCount && ULO.TripMultiple % ULO.Count != 0 &&
  435       !UnrollRuntimeLoopRemainder(L, ULO.Count, ULO.AllowExpensiveTripCount,
  435       !UnrollRuntimeLoopRemainder(L, ULO.Count, ULO.AllowExpensiveTripCount,
  436                                   EpilogProfitability, ULO.UnrollRemainder,
  437                                   ULO.ForgetAllSCEV, LI, SE, DT, AC,
  439     if (ULO.Force)
  450   if (ULO.TripCount != 0) {
  451     BreakoutTrip = ULO.TripCount % ULO.Count;
  451     BreakoutTrip = ULO.TripCount % ULO.Count;
  452     ULO.TripMultiple = 0;
  455     BreakoutTrip = ULO.TripMultiple =
  456         (unsigned)GreatestCommonDivisor64(ULO.Count, ULO.TripMultiple);
  456         (unsigned)GreatestCommonDivisor64(ULO.Count, ULO.TripMultiple);
  463                       << " with trip count " << ULO.TripCount << "!\n");
  469                << NV("UnrollCount", ULO.TripCount) << " iterations";
  471   } else if (ULO.PeelCount) {
  473                       << " with iteration count " << ULO.PeelCount << "!\n");
  478                << " peeled loop by " << NV("PeelCount", ULO.PeelCount)
  486                   << NV("UnrollCount", ULO.Count);
  490                       << ULO.Count);
  491     if (ULO.TripMultiple == 0 || BreakoutTrip != ULO.TripMultiple) {
  491     if (ULO.TripMultiple == 0 || BreakoutTrip != ULO.TripMultiple) {
  498     } else if (ULO.TripMultiple != 1) {
  499       LLVM_DEBUG(dbgs() << " with " << ULO.TripMultiple << " trips per branch");
  503                  << " with " << NV("TripMultiple", ULO.TripMultiple)
  524     if (ULO.ForgetAllSCEV)
  592             auto NewDIL = DIL->cloneByMultiplyingDuplicationFactor(ULO.Count);
  601   for (unsigned It = 1; It != ULO.Count; ++It) {
  699     } else if (ULO.Count > 1) {
  767             (ULO.PreserveCondBr && j && !(ULO.PreserveOnlyFirst && i != 0));
  767             (ULO.PreserveCondBr && j && !(ULO.PreserveOnlyFirst && i != 0));
  769                  (ULO.TripMultiple == 0 || j % ULO.TripMultiple != 0)) {
  769                  (ULO.TripMultiple == 0 || j % ULO.TripMultiple != 0)) {
  792         NeedConditional = j == 0 || ULO.PreserveCondBr;
  794                (ULO.TripMultiple == 0 || j % ULO.TripMultiple != 0))
  794                (ULO.TripMultiple == 0 || j % ULO.TripMultiple != 0))
  828   if (DT && ULO.Count > 1) {
  898   simplifyLoopAfterUnroll(L, !CompletelyUnroll && (ULO.Count > 1 || Peeled), LI,