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

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 5 11:25:32 PDT 2023


wenlei added a comment.

> 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 :)

Well.. this is a heuristic that is not on for all patch. In the case of sample loader, when profi is on, we don't do the +1 thingy. We also don't do +1 because 0 is invalid. So it holds true that the abstract representation used here conflicts with a valid concrete representation.

> 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.

SG. Unfortunately, some oddities can't be cleaned up easily. We probably have to live with the fact that sometimes we care about the values of branch weights, and sometimes only its distribution..


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