[PATCH] D124302: [llvm][misexpect] Replace assertion with early return

Paul Kirth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 22 14:42:10 PDT 2022


paulkirth added a comment.

One concern I have here, since someone reported this to me is that perhaps some of MisExpect's assumptions regarding when branch weight metadata will be attached is erroneous.

The key assumptions we make are that for frontend instrumentation that any branch weights that have been attached when LowerExpectIntrinsics runs will originate from profiling. The other key assumption we make is that when branch weights are assigned for IR instrumentation that LowerExpectIntrinsic is the only place that can add these weights before they are added by the IR or sample profiles. If that's not the case, then we need to discuss a way to address that shortcoming.

That concern doesn't change the need for this fix, but may require some more in depth discussion on discourse about how to address this in a comprehensive manner.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124302



More information about the llvm-commits mailing list