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

References

lib/Transforms/Scalar/LoopUnrollPass.cpp
  747     UP.Count = UnrollCount;
  748     UP.AllowExpensiveTripCount = true;
  749     UP.Force = true;
  750     if (UP.AllowRemainder && getUnrolledLoopSize(LoopSize, UP) < UP.Threshold)
  750     if (UP.AllowRemainder && getUnrolledLoopSize(LoopSize, UP) < UP.Threshold)
  750     if (UP.AllowRemainder && getUnrolledLoopSize(LoopSize, UP) < UP.Threshold)
  757     UP.Count = PragmaCount;
  758     UP.Runtime = true;
  759     UP.AllowExpensiveTripCount = true;
  760     UP.Force = true;
  761     if ((UP.AllowRemainder || (TripMultiple % PragmaCount == 0)) &&
  762         getUnrolledLoopSize(LoopSize, UP) < PragmaUnrollThreshold)
  767     UP.Count = TripCount;
  768     if (getUnrolledLoopSize(LoopSize, UP) < PragmaUnrollThreshold)
  780     UP.Threshold = std::max<unsigned>(UP.Threshold, PragmaUnrollThreshold);
  780     UP.Threshold = std::max<unsigned>(UP.Threshold, PragmaUnrollThreshold);
  781     UP.PartialThreshold =
  782         std::max<unsigned>(UP.PartialThreshold, PragmaUnrollThreshold);
  801   if (!(UP.UpperBound || MaxOrZero) ||
  813   UP.Count = FullUnrollTripCount;
  814   if (FullUnrollTripCount && FullUnrollTripCount <= UP.FullUnrollMaxCount) {
  817     if (getUnrolledLoopSize(LoopSize, UP) < UP.Threshold) {
  817     if (getUnrolledLoopSize(LoopSize, UP) < UP.Threshold) {
  820       TripMultiple = UP.UpperBound ? 1 : TripMultiple;
  828               UP.Threshold * UP.MaxPercentThresholdBoost / 100)) {
  828               UP.Threshold * UP.MaxPercentThresholdBoost / 100)) {
  830             getFullUnrollBoostingFactor(*Cost, UP.MaxPercentThresholdBoost);
  831         if (Cost->UnrolledCost < UP.Threshold * Boost / 100) {
  834           TripMultiple = UP.UpperBound ? 1 : TripMultiple;
  842   computePeelCount(L, LoopSize, UP, TripCount, SE);
  843   if (UP.PeelCount) {
  844     UP.Runtime = false;
  845     UP.Count = 1;
  852     UP.Partial |= ExplicitUnroll;
  853     if (!UP.Partial) {
  856       UP.Count = 0;
  859     if (UP.Count == 0)
  860       UP.Count = TripCount;
  861     if (UP.PartialThreshold != NoThreshold) {
  863       if (getUnrolledLoopSize(LoopSize, UP) > UP.PartialThreshold)
  863       if (getUnrolledLoopSize(LoopSize, UP) > UP.PartialThreshold)
  864         UP.Count =
  865             (std::max(UP.PartialThreshold, UP.BEInsns + 1) - UP.BEInsns) /
  865             (std::max(UP.PartialThreshold, UP.BEInsns + 1) - UP.BEInsns) /
  865             (std::max(UP.PartialThreshold, UP.BEInsns + 1) - UP.BEInsns) /
  866             (LoopSize - UP.BEInsns);
  867       if (UP.Count > UP.MaxCount)
  867       if (UP.Count > UP.MaxCount)
  868         UP.Count = UP.MaxCount;
  868         UP.Count = UP.MaxCount;
  869       while (UP.Count != 0 && TripCount % UP.Count != 0)
  869       while (UP.Count != 0 && TripCount % UP.Count != 0)
  870         UP.Count--;
  871       if (UP.AllowRemainder && UP.Count <= 1) {
  871       if (UP.AllowRemainder && UP.Count <= 1) {
  876         UP.Count = UP.DefaultUnrollRuntimeCount;
  876         UP.Count = UP.DefaultUnrollRuntimeCount;
  877         while (UP.Count != 0 &&
  878                getUnrolledLoopSize(LoopSize, UP) > UP.PartialThreshold)
  878                getUnrolledLoopSize(LoopSize, UP) > UP.PartialThreshold)
  879           UP.Count >>= 1;
  881       if (UP.Count < 2) {
  891         UP.Count = 0;
  894       UP.Count = TripCount;
  896     if (UP.Count > UP.MaxCount)
  896     if (UP.Count > UP.MaxCount)
  897       UP.Count = UP.MaxCount;
  897       UP.Count = UP.MaxCount;
  899         UP.Count != TripCount)
  908     LLVM_DEBUG(dbgs() << "  partially unrolling with count: " << UP.Count
  927     UP.Count = 0;
  932   if (MaxTripCount && !UP.Force && MaxTripCount < UnrollMaxUpperBound) {
  933     UP.Count = 0;
  943         UP.AllowExpensiveTripCount = true;
  948   UP.Runtime |= PragmaEnableUnroll || PragmaCount > 0 || UserUnrollCount;
  949   if (!UP.Runtime) {
  953     UP.Count = 0;
  956   if (UP.Count == 0)
  957     UP.Count = UP.DefaultUnrollRuntimeCount;
  957     UP.Count = UP.DefaultUnrollRuntimeCount;
  961   while (UP.Count != 0 &&
  962          getUnrolledLoopSize(LoopSize, UP) > UP.PartialThreshold)
  962          getUnrolledLoopSize(LoopSize, UP) > UP.PartialThreshold)
  963     UP.Count >>= 1;
  966   unsigned OrigCount = UP.Count;
  969   if (!UP.AllowRemainder && UP.Count != 0 && (TripMultiple % UP.Count) != 0) {
  969   if (!UP.AllowRemainder && UP.Count != 0 && (TripMultiple % UP.Count) != 0) {
  969   if (!UP.AllowRemainder && UP.Count != 0 && (TripMultiple % UP.Count) != 0) {
  970     while (UP.Count != 0 && TripMultiple % UP.Count != 0)
  970     while (UP.Count != 0 && TripMultiple % UP.Count != 0)
  971       UP.Count >>= 1;
  978                << " to " << UP.Count << ".\n");
  982     if (PragmaCount > 0 && !UP.AllowRemainder)
  994                << NV("UnrollCount", UP.Count) << " time(s).";
  998   if (UP.Count > UP.MaxCount)
  998   if (UP.Count > UP.MaxCount)
  999     UP.Count = UP.MaxCount;
  999     UP.Count = UP.MaxCount;
 1001   if (MaxTripCount && UP.Count > MaxTripCount)
 1002     UP.Count = MaxTripCount;
 1004   LLVM_DEBUG(dbgs() << "  runtime unrolling with count: " << UP.Count
 1006   if (UP.Count < 2)
 1007     UP.Count = 0;