Lines Matching defs:Scale
1437 /// Scale an individual branch weight (and add 1).
1439 /// Scale a 64-bit weight down to 32-bits using \c Scale.
1444 /// \pre \c Scale was calculated by \a calculateWeightScale() with a weight no
1446 static uint32_t scaleBranchWeight(uint64_t Weight, uint64_t Scale) {
1447 assert(Scale && "scale by 0?");
1448 uint64_t Scaled = Weight / Scale + 1;
1460 uint64_t Scale = calculateWeightScale(std::max(TrueCount, FalseCount));
1463 return MDHelper.createBranchWeights(scaleBranchWeight(TrueCount, Scale),
1464 scaleBranchWeight(FalseCount, Scale));
1479 uint64_t Scale = calculateWeightScale(MaxWeight);
1484 ScaledWeights.push_back(scaleBranchWeight(W, Scale));