reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
3903 if (!Weights) 3906 assert(SI.getNumSuccessors() == Weights->size() && 3910 all_of(Weights.getValue(), [](uint32_t W) { return W == 0; }); 3912 if (AllZeroes || Weights.getValue().size() < 2) 3915 return MDBuilder(SI.getParent()->getContext()).createBranchWeights(*Weights); 3934 this->Weights = std::move(Weights); 3939 if (Weights) { 3940 assert(SI.getNumSuccessors() == Weights->size() && 3946 Weights.getValue()[I->getCaseIndex() + 1] = Weights.getValue().back(); 3946 Weights.getValue()[I->getCaseIndex() + 1] = Weights.getValue().back(); 3947 Weights.getValue().pop_back(); 3957 if (!Weights && W && *W) { 3959 Weights = SmallVector<uint32_t, 8>(SI.getNumSuccessors(), 0); 3960 Weights.getValue()[SI.getNumSuccessors() - 1] = *W; 3961 } else if (Weights) { 3963 Weights.getValue().push_back(W ? *W : 0); 3965 if (Weights) 3966 assert(SI.getNumSuccessors() == Weights->size() && 3974 if (Weights) 3975 Weights->resize(0); 3981 if (!Weights) 3983 return Weights.getValue()[idx]; 3991 if (!Weights && *W) 3992 Weights = SmallVector<uint32_t, 8>(SI.getNumSuccessors(), 0); 3994 if (Weights) { 3995 auto &OldW = Weights.getValue()[idx];