Home | History | Annotate | Download | only in Analysis

Lines Matching defs:Weights

67 // Weights are for internal use only. They are used by heuristics to help to
70 // Using "Loop Branch Heuristics" we predict weights of edges for the
200 /// Calculate edge weights for successors lead to unreachable.
261 // Ensure there are weights for all of the successors. Note that the first
266 // Build up the final weights that will be used in a temporary buffer.
267 // Compute the sum of all weights to later decide whether they need to
270 SmallVector<uint32_t, 2> Weights;
273 Weights.reserve(TI->getNumSuccessors());
281 Weights.push_back(Weight->getZExtValue());
282 WeightSum += Weights.back();
288 assert(Weights.size() == TI->getNumSuccessors() && "Checked above");
290 // If the sum of weights does not fit in 32 bits, scale every weight down
298 Weights[i] /= ScalingFactor;
299 WeightSum += Weights[i];
303 "Expected weights to scale down to 32 bits");
307 Weights[i] = 1;
314 BP.push_back({ Weights[i], static_cast<uint32_t>(WeightSum) });
342 /// Calculate edge weights for edges leading to cold blocks.
348 /// Return true if we could compute the weights for cold edges.
392 // Calculate Edge Weights using "Pointer Heuristics". Predict a comparison
566 // Calculate Edge Weights using "Loop Branch Heuristics". Predict backedges