[PATCH] D157462: LoopRotate: Add code to update branch weights

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 23 22:27:53 PDT 2023


wenlei accepted this revision.
wenlei added a comment.
This revision is now accepted and ready to land.

I agree that hard coded probability is not great. But I also don't think there is a one-size-fit-all answer here. EH path can be unlikely, z-trip loop can be unlikely, [[unlikely]] hint can be unlikely, but they don't necessarily share the same probability.

I think something like `InlineConstants`, a global `ProbabilityConstants` may be an alternative.

But we can defer that part, and the change as is lgtm.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157462



More information about the llvm-commits mailing list