[PATCH] D158680: RFC: Interpet {branch_weights 1, 0} as likely/unlikely

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 5 11:14:54 PDT 2023


MatzeB added a comment.

This is already abandoned, so will not further pursue this. But for the discussion:

> In general, an abstract representation should not conflict with a valid concrete representation..

In some way this change assumed that `1,0` was not really a valid representation. Because as you point out later sample profile loaders etc. actually trying hard to avoid the `,0` case by adding +1 which feels like people maybe do not want it to be legal and then we could have re-used it :)

Normalization is also an interesting topic and FWIW we do have the `BranchProbability` used by BPI and MIR-representation that is more normalized (though there is also oddities, like noone forcing them to sum up to "1" in the backend...) Anyway I'll keep mulling over those in the background, as they're mostly just oddities that I cannot understand, but not necessarily a problem.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158680/new/

https://reviews.llvm.org/D158680



More information about the llvm-commits mailing list