[PATCH] D158889: [AsmPrinter][PGO] Adds optional dumping of branch probabilities for PGO metrics.

Micah Weston via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 28 07:55:59 PDT 2023


red1bluelost added a comment.

In D158889#4619737 <https://reviews.llvm.org/D158889#4619737>, @hoy wrote:

> In D158889#4618519 <https://reviews.llvm.org/D158889#4618519>, @wenlei wrote:
>
>> We have something similar internally, but didn't upstream because we are not sure if the use case is too narrow to justify burdening the code base with all the related complexity.  cc @hoy
>
> Yeah, we internally serialize machine block execution counts to the binary.  Would it be helpful to write those counts into some bb section similar to the `llvm_bb_addr_map` section?

This is interesting and similar but our metrics are only focusing on branch weights at the moment. We've focused on branch weights so far since they are a direct result of Profile Loading.

At least for the current state of the metrics here and consumed in D158890 <https://reviews.llvm.org/D158890>, there is not a use for block counts but it could be a future extension of the metrics.


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

https://reviews.llvm.org/D158889



More information about the llvm-commits mailing list