[PATCH] D81449: [JumpThreading] Handle zero !prof branch_weights
Yevgeny Rouban via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 10 05:59:27 PDT 2020
yrouban marked an inline comment as done.
yrouban added a comment.
@kazu, @nikic, @yamauchi, @ebrevnov, @efriedma, please review this small fix.
================
Comment at: llvm/lib/Transforms/Scalar/JumpThreading.cpp:257-260
BP = (CI->isOne() ? BranchProbability::getBranchProbability(
TrueWeight, TrueWeight + FalseWeight)
: BranchProbability::getBranchProbability(
FalseWeight, TrueWeight + FalseWeight));
----------------
Here //BranchProbability::getBranchProbability(..., TrueWeight + FalseWeight)// results in zero denominator if both //TrueWeight// and //FalseWeight// are zero.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81449/new/
https://reviews.llvm.org/D81449
More information about the llvm-commits
mailing list