HomeSort by: relevance | last modified time | path
    Searched defs:Weights (Results 1 - 13 of 13) sorted by relevancy

  /src/external/apache2/llvm/dist/llvm/lib/Transforms/Utils/
Local.cpp 221 // Collect branch weights into a vector.
222 SmallVector<uint32_t, 8> Weights;
226 Weights.push_back(CI->getValue().getZExtValue());
230 Weights[0] += Weights[idx+1];
232 std::swap(Weights[idx+1], Weights.back());
233 Weights.pop_back();
236 createBranchWeights(Weights));
SimplifyCFG.cpp 818 // Set branch weights on SwitchInst. This sets the metadata if there is at
820 static void setBranchWeights(SwitchInst *SI, ArrayRef<uint32_t> Weights) {
824 if (llvm::any_of(Weights, [](uint32_t W) { return W != 0; }))
825 N = MDBuilder(SI->getParent()->getContext()).createBranchWeights(Weights);
830 // exactly 2 weights.
1028 /// Get Weights of a given terminator, the default weight is at the front
1032 SmallVectorImpl<uint64_t> &Weights) {
1037 Weights.push_back(CI->getValue().getZExtValue());
1044 assert(Weights.size() == 2);
1047 std::swap(Weights.front(), Weights.back())
    [all...]
  /src/external/apache2/llvm/dist/llvm/lib/CodeGen/
StackProtector.cpp 557 MDNode *Weights = MDBuilder(F->getContext())
560 B.CreateCondBr(Cmp, NewBB, FailBB, Weights);
SafeStack.cpp 478 MDNode *Weights = MDBuilder(F.getContext())
482 SplitBlockAndInsertIfThen(Cmp, &RI, /* Unreachable */ true, Weights, DTU);
  /src/external/apache2/llvm/dist/clang/lib/CodeGen/
CGDeclCXX.cpp 346 llvm::MDNode *Weights;
352 Weights = nullptr;
365 Weights = MDHelper.createBranchWeights(1, NumInits - 1);
368 Builder.CreateCondBr(NeedsInit, InitBlock, NoInitBlock, Weights);
CGStmt.cpp 751 // Prefer the PGO based weights over the likelihood attribute.
839 llvm::MDNode *Weights =
841 if (!Weights && CGM.getCodeGenOpts().OptimizationLevel)
844 Builder.CreateCondBr(BoolCondVal, LoopBody, ExitBlock, Weights);
1019 llvm::MDNode *Weights =
1021 if (!Weights && CGM.getCodeGenOpts().OptimizationLevel)
1025 Builder.CreateCondBr(BoolCondVal, ForBody, ExitBlock, Weights);
1104 llvm::MDNode *Weights =
1106 if (!Weights && CGM.getCodeGenOpts().OptimizationLevel)
1109 Builder.CreateCondBr(BoolCondVal, ForBody, ExitBlock, Weights);
    [all...]
CodeGenFunction.cpp 1741 // When computing PGO branch weights, we only know the overall count for
1789 llvm::MDNode *Weights = nullptr;
1812 Weights = createProfileWeights(TrueCount, CurrentCount - TrueCount);
1815 Builder.CreateCondBr(CondV, TrueBlock, FalseBlock, Weights, Unpredictable);
  /src/external/apache2/llvm/dist/llvm/lib/Analysis/
BranchProbabilityInfo.cpp 77 // Weights are for internal use only. They are used by heuristics to help to
80 // Using "Loop Branch Heuristics" we predict weights of edges for the
123 /// Set of dedicated "absolute" execution weights for a block. These weights are
320 // Ensure there are weights for all of the successors. Note that the first
325 // Build up the final weights that will be used in a temporary buffer.
326 // Compute the sum of all weights to later decide whether they need to
329 SmallVector<uint32_t, 2> Weights;
332 Weights.reserve(TI->getNumSuccessors());
340 Weights.push_back(Weight->getZExtValue())
    [all...]
  /src/external/apache2/llvm/dist/llvm/lib/Transforms/IPO/
SampleProfile.cpp 16 // - prof: Represents branch weights. This annotation is added to branches
17 // to indicate the weights of each edge coming out of the branch.
225 "overwrite-existing-weights", cl::Hidden, cl::init(false),
226 cl::desc("Ignore existing branch weights on IR and always overwrite."));
1314 // with call site weights.
1433 // edge weights computed during propagation.
1436 // edge weights computed during propagation.
1437 LLVM_DEBUG(dbgs() << "\nPropagation complete. Setting branch weights\n");
1514 LLVM_DEBUG(dbgs() << "\nGetting weights for branch at line "
1518 SmallVector<uint32_t, 4> Weights;
    [all...]
  /src/external/apache2/llvm/dist/llvm/lib/Transforms/Instrumentation/
ControlHeightReduction.cpp 622 // Guard against 0-to-0 branch weights to avoid a division-by-zero crash.
1865 uint32_t Weights[] = {
1870 MergedBR->setMetadata(LLVMContext::MD_prof, MDB.createBranchWeights(Weights));
1871 CHR_DEBUG(dbgs() << "CHR branch bias " << Weights[0] << ":" << Weights[1]
PGOInstrumentation.cpp 30 // annotates the branch weights. It also reads the indirect call value
1075 // Set the branch weights based on the count values.
1084 // Annotate the irreducible loop header weights.
1435 LLVM_DEBUG(dbgs() << "\nSetting branch weights for func " << F.getName()
1478 LLVM_DEBUG(dbgs() << "\nAnnotating irreducible loop header weights.\n");
2036 SmallVector<unsigned, 4> Weights;
2038 Weights.push_back(scaleBranchCount(ECI, Scale));
2041 : Weights) {
2045 TI->setMetadata(LLVMContext::MD_prof, MDB.createBranchWeights(Weights));
2052 std::accumulate(Weights.begin(), Weights.end(), (uint64_t)0
    [all...]
  /src/external/apache2/llvm/dist/llvm/lib/Transforms/Scalar/
JumpThreading.cpp 299 SmallVector<uint32_t, 2> Weights;
301 Weights.push_back(BP.getNumerator());
302 Weights.push_back(BP.getCompl().getNumerator());
304 Weights.push_back(BP.getCompl().getNumerator());
305 Weights.push_back(BP.getNumerator());
309 .createBranchWeights(Weights));
391 // When profile data is available, we need to update edge weights after
2500 // Ensure there are weights for all of the successors. Note that the first
2561 // calculated weights are fully consistent. Consider this graph:
2589 SmallVector<uint32_t, 4> Weights;
    [all...]
  /src/external/apache2/llvm/dist/llvm/lib/IR/
Instructions.cpp 572 LLVM_DEBUG(dbgs() << "Attempting to update profile weights will result in "
4114 if (!Weights)
4117 assert(SI.getNumSuccessors() == Weights->size() &&
4121 all_of(Weights.getValue(), [](uint32_t W) { return W == 0; });
4123 if (AllZeroes || Weights.getValue().size() < 2)
4126 return MDBuilder(SI.getParent()->getContext()).createBranchWeights(*Weights);
4139 SmallVector<uint32_t, 8> Weights;
4143 Weights.push_back(CW);
4145 this->Weights = std::move(Weights);
    [all...]

Completed in 63 milliseconds