[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
Sat Aug 26 08:27:15 PDT 2023
red1bluelost added a comment.
In D158889#4618718 <https://reviews.llvm.org/D158889#4618718>, @mtrofin wrote:
> This is great! Can you share what tracing methodology you use?
We used Pin Tool to collect branch traces and a basic python script to process the data and generate CSVs
and stats. Those are in the second patch D158890 <https://reviews.llvm.org/D158890>. We've been able to use these metrics on x86 and
internally with a slightly modified script but it should be able to support other targets that can collect
branch traces.
In D158889#4619073 <https://reviews.llvm.org/D158889#4619073>, @mtrofin wrote:
> BTW, have you considered using `-mbb-profile-dump` (defined in AsmPrinter.cpp) - same intention, just MBB frequencies, and dumping to a csv; also assumes compilation happened with `-basic-block-sections=labels`
We had not considered that. We mainly focused in on branch weights since it is a primary result of
SamplePGO. Definitely will look into if similar metrics can be done :)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158889/new/
https://reviews.llvm.org/D158889
More information about the llvm-commits
mailing list