Lines Matching full:latch
102 // * The loop has a single latch with the condition of the form:
108 // For the ult latch comparison case M is:
156 // * The loop has a single latch with the condition of the form:
161 // For the ugt latch comparison case M is:
223 // This is the scale factor for the latch probability. We use this during
225 // probability of exiting the loop instead of loop exiting via latch.
228 "loop-predication-latch-probability-scale", cl::Hidden, cl::init(2.0),
229 cl::desc("scale factor for the latch probability. Value should be greater "
316 // predicate based on the latch check. For example, the latch check can be a
401 // predication, by generating SCEVs for the range and latch that are of the
403 // latch IV. This is done iff truncation of the IV is a safe operation,
420 "Expected latch check IV type to be larger than range check operand "
436 // guarantees that truncating the latch check to RangeCheckType is a safe
445 // Return an LoopICmp describing a latch check equivlent to LatchCheck but with
455 // For now, bail out if latch type is narrower than range type.
547 // where <pred> depends on the latch condition predicate. See the file
613 // The decrement of the latch check IV should be the same as the
659 // parseLoopStructure guarantees that the latch condition is:
665 LLVM_DEBUG(dbgs() << "Failed to parse the loop latch condition!\n");
681 // We cannot just compare with latch IV step because the latch and range IVs
684 LLVM_DEBUG(dbgs() << "Range check and latch have IVs different steps!\n");
690 LLVM_DEBUG(dbgs() << "Failed to generate a loop latch check "
697 // At this point, the range and latch step should have the same type, but need
701 "Range and latch steps should be of same type!");
703 LLVM_DEBUG(dbgs() << "Range and latch have different step values!\n");
813 LLVM_DEBUG(dbgs() << "The loop doesn't have a single latch!\n");
819 LLVM_DEBUG(dbgs() << "Failed to match the latch terminator!\n");
825 "One of the latch's destinations must be the header");
829 LLVM_DEBUG(dbgs() << "Failed to match the latch condition!\n");
834 LLVM_DEBUG(dbgs() << "Failed to parse the loop latch condition!\n");
867 LLVM_DEBUG(dbgs() << "Unsupported loop latch predicate(" << Result->Pred
889 // exiting the loop is larger than exiting through the latch block, it's not
892 assert(LatchBlock && "Should have a single latch at this point!");
903 // If the latch exits into a deoptimize or an unreachable block, do not
904 // predicate on that latch check.
910 // Latch terminator has no valid profile data, so nothing to check
935 "Latch term should always have profile data!");
950 << "Ignored user setting for loop-predication-latch-probability-scale: "
960 // Some exiting edge has higher probability than the latch exiting edge.
967 // loop is through the latch (or there's no profile information and all
1017 "dominate latch!");
1034 // It assumes that the latch is the dominant exit for profitability and that
1056 auto *Latch = L->getLoopLatch();
1057 if (!Latch)
1064 const SCEV *LatchEC = SE->getExitCount(L, Latch);
1068 // At this point, we have found an analyzeable latch, and a widenable
1100 // The use of umin(all analyzeable exits) instead of latch is subtle, but
1161 assert(!Latch || DT->dominates(ExitingBB, Latch));
1216 LLVM_DEBUG(dbgs() << "Latch check:\n");