[llvm] BranchProbabilityInfo: Report branch_weights 1, 0 for invoke (PR #72947)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 20 19:50:18 PST 2023
WenleiHe wrote:
Not sure if this is worth adding a new calcFixedWeights...
One can always contrive a case where `0xfffff : 1` is actually close to ground truth than `1:0` for exception. If this is just for non-PGO case, it's not possible to make a generally good guess anyways.
However even if there is something that is generally better, can that be achieved with current calcEstimatedHeuristics? I see two ways of doing it, either increase `DEFAULT` or make `UNWIND ` 0. Having an inconsistent way of arriving at a branch probability seems unnecessary IMO.
https://github.com/llvm/llvm-project/pull/72947
More information about the llvm-commits
mailing list