[PATCH] D131306: [llvm][misexpect] Track provenance of branch weights

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 29 10:17:42 PDT 2022


tejohnson added subscribers: xur, davidxl.
tejohnson added a comment.

@davidxl @xur for review and thoughts.

I'm a little wary of requiring that both pieces of metadata be carried together, as that seems very brittle to maintain in the compiler. What would happen if the MD_expected didn't get propagated by some pass along with the MD_prof? I think you would get a false negative, which I suppose is better than a false positive. An alternative, that I guess would require more extensive changes, is to add an additional item to the "branch_weights" list (would need to be obviously distinguishable by type from the list of weights since that can be variable though).

Patch needs tests showing uses of the new metadata, and some documentation in LangRef (i.e. near https://llvm.org/docs/LangRef.html#prof-metadata).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131306



More information about the llvm-commits mailing list