Lines Matching defs:Weight
95 using Weight = BlockFrequencyInfoImplBase::Weight;
122 BlockMass takeMass(uint32_t Weight);
134 BlockMass DitheringDistributer::takeMass(uint32_t Weight) {
135 assert(Weight && "invalid weight");
136 assert(Weight <= RemWeight);
137 BlockMass Mass = RemMass * BranchProbability(Weight, RemWeight);
140 RemWeight -= Weight;
146 Weight::DistType Type) {
159 Weights.push_back(Weight(Type, Node, Amount));
162 static void combineWeight(Weight &W, const Weight &OtherW) {
180 llvm::sort(Weights, [](const Weight &L, const Weight &R) {
201 using HashTable = DenseMap<BlockNode::IndexType, Weight>;
204 for (const Weight &W : Weights)
267 [](uint64_t Sum, const Weight &W) {
279 for (Weight &W : Weights) {
316 uint64_t Weight) {
317 if (!Weight)
318 Weight = 1;
329 << " [" << Type << "] weight = " << Weight;
341 Dist.addBackedge(Resolved, Weight);
347 Dist.addExit(Resolved, Weight);
370 Dist.addLocal(Resolved, Weight);
456 for (const Weight &W : Dist.Weights) {
459 if (W.Type == Weight::Local) {
469 if (W.Type == Weight::Backedge) {
476 assert(W.Type == Weight::Exit);
841 for (const Weight &W : Dist.Weights) {
843 assert(W.Type == Weight::Local && "all weights should be local");
852 for (const Weight &W : Dist.Weights) {
854 assert(W.Type == Weight::Local && "all weights should be local");