[PATCH] D158890: [PGO] Adds branch accuracy metric script and x86 branch tracing tool.
Micah Weston via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 25 14:10:52 PDT 2023
red1bluelost created this revision.
red1bluelost added reviewers: wenlei, davidxl.
Herald added subscribers: wlei, pengfei.
Herald added a project: All.
red1bluelost requested review of this revision.
Herald added subscribers: llvm-commits, wangpc.
Herald added a project: LLVM.
[2/2] This is the second of two patches for branch accuracy metrics.
Depends on D158889 <https://reviews.llvm.org/D158889>
Patch adds a utility script for collecting branch accuracy metrics and a pin tool file
for tracing branches on x86. The metrics currently just support x86 but should be
extensible for other targets as well.
The script consumes compiler branch probabilities (from patch 1 of 2) and branch
traces (from Pin) to generate overall statistics about branch accuracy and a CSV of
individual jump accuracy. These metrics should help judging accuracy of PGO
generate branch weights.
We've been using these metrics at MediaTek to help track PGO accuracy changes
and find bugs in our toolchain.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D158890
Files:
llvm/utils/BranchAccuracy/README.md
llvm/utils/BranchAccuracy/X86/cond_br_trace.cpp
llvm/utils/BranchAccuracy/X86/makefile
llvm/utils/BranchAccuracy/X86/makefile.rules
llvm/utils/BranchAccuracy/branch_accuracy_data.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158890.553612.patch
Type: text/x-patch
Size: 24234 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230825/1915a2fb/attachment.bin>
More information about the llvm-commits
mailing list