Lines Matching full:weight

90 //          |   | (Weight = 124)
94 // | (Weight = 4)
199 /// Special weight used for cases with exact zero probability.
201 /// Minimal possible non zero weight.
203 /// Weight to an 'unreachable' block.
205 /// Weight to a block containing non returning call.
207 /// Weight to 'unwind' block of an invoke instruction.
209 /// Weight to a 'cold' block. Cold blocks are the ones containing calls marked
212 /// Default weight is used in cases when there is no dedicated execution
213 /// weight set. It is not propagated through the domination line either.
415 // If the sum of weights does not fit in 32 bits, scale every weight down in calcMetadataWeights()
663 // For edges entering a loop take weight of a loop rather than an individual in getEstimatedEdgeWeight()
677 auto Weight = getEstimatedEdgeWeight({SrcLoopBB, DstLoopBB}); in getMaxEstimatedEdgeWeight() local
679 if (!Weight) in getMaxEstimatedEdgeWeight()
682 if (!MaxWeight || *MaxWeight < *Weight) in getMaxEstimatedEdgeWeight()
683 MaxWeight = Weight; in getMaxEstimatedEdgeWeight()
689 // Updates \p LoopBB's weight and returns true. If \p LoopBB has already
690 // an associated weight it is unchanged and false is returned.
692 // Please note by the algorithm the weight is not expected to change once set
700 // In general, weight is assigned to a block when it has final value and in updateEstimatedBlockWeight()
704 // set weight is favored and all consequent weights are ignored. in updateEstimatedBlockWeight()
731 // successor has updated estimated weight.
740 // TODO: Consider propagating weight down the domination line as well. in propagateEstimatedBlockWeight()
752 // Don't propagate weight to blocks belonging to different loops. in propagateEstimatedBlockWeight()
756 // If DomBB has weight set then all it's predecessors are already in propagateEstimatedBlockWeight()
757 // processed (since we propagate weight up to the top of IR each time). in propagateEstimatedBlockWeight()
777 // Important note regarding the order of checks. They are ordered by weight in getInitialEstimatedBlockWeight()
805 // best to propagate the weight to up/down the IR.
817 // If we were able to find estimated weight for the block set it to this in computeEestimateBlockWeight()
823 // successor/exit having estimated weight. Try to propagate weight to such in computeEestimateBlockWeight()
858 // weight of "hot" path. In theory we can probably find a better function in computeEestimateBlockWeight()
873 // Calculate edge probabilities based on block's estimated weight.
887 // Changed to 'true' if at least one successor has estimated weight. in calcEstimatedHeuristics()
893 std::optional<uint32_t> Weight; in calcEstimatedHeuristics() local
897 Weight = getEstimatedEdgeWeight(Edge); in calcEstimatedHeuristics()
900 // Avoid adjustment of ZERO weight since it should remain unchanged. in calcEstimatedHeuristics()
901 Weight != static_cast<uint32_t>(BlockExecWeight::ZERO)) { in calcEstimatedHeuristics()
902 // Scale down loop exiting weight by trip count. in calcEstimatedHeuristics()
903 Weight = std::max( in calcEstimatedHeuristics()
905 Weight.value_or(static_cast<uint32_t>(BlockExecWeight::DEFAULT)) / in calcEstimatedHeuristics()
910 // Avoid adjustment of ZERO weight since it should remain unchanged. in calcEstimatedHeuristics()
911 Weight != static_cast<uint32_t>(BlockExecWeight::ZERO)) { in calcEstimatedHeuristics()
912 // 'Unlikely' blocks have twice lower weight. in calcEstimatedHeuristics()
913 Weight = std::max( in calcEstimatedHeuristics()
915 Weight.value_or(static_cast<uint32_t>(BlockExecWeight::DEFAULT)) / 2); in calcEstimatedHeuristics()
918 if (Weight) in calcEstimatedHeuristics()
922 Weight.value_or(static_cast<uint32_t>(BlockExecWeight::DEFAULT)); in calcEstimatedHeuristics()
927 // If non of blocks have estimated weight bail out. in calcEstimatedHeuristics()
928 // If TotalWeight is 0 that means weight of each successor is 0 as well and in calcEstimatedHeuristics()
936 // If the sum of weights does not fit in 32 bits, scale every weight down in calcEstimatedHeuristics()
948 assert(TotalWeight <= UINT32_MAX && "Total weight overflows"); in calcEstimatedHeuristics()