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

Paul Kirth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 29 11:02:57 PDT 2022


paulkirth added a comment.

In D131306#3756087 <https://reviews.llvm.org/D131306#3756087>, @tejohnson wrote:

> Well I was thinking the extra field would be optional as well and could be removed. But understood that this requires more changes (although maybe not if it is optional, and after your recent changes to centralize some of the prof metadata handling in the compiler).

Hmm, I don't think I considered that a field in the metadata could be optional. Do you mean something like this?

  !{!"branch_weights", !10, i32 1717986918, i32 429496731}

where `!10` is just some optional metadata, and we'd just ensure things that parse the MD_prof data skip it correctly? Given that we've mostly consolidated how branch weights are extracted and manipulated that might only require a limited number of updates to the code and tests.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131306



More information about the cfe-commits mailing list