[llvm-branch-commits] [BOLT] Ignore returns in DataAggregator (PR #90807)
Amir Ayupov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed May 1 18:09:46 PDT 2024
https://github.com/aaupov created https://github.com/llvm/llvm-project/pull/90807
Returns are ignored in perf/pre-aggregated/fdata profile reader (see
DataReader::convertBranchData). They are also omitted in
YAMLProfileWriter by virtue of not having the profile attached to them
in the reader, and YAMLProfileWriter converting the profile attached to
BinaryFunctions. Thus, return profile is universally ignored across all
profile types except BAT YAML.
To make returns ignored for YAML produced in BAT mode, we can:
1) ignore them in YAMLProfileReader,
2) omit them from YAML profile in profile conversion/writing.
The first option is prone to profile staleness issue, where the profiled
binary doesn't match the one to be optimized, and thus returns in the
profile can no longer be reliably detected (as we don't distinguish them
from calls in the profile).
The second option is more robust but requires disassembling the
functions. We already do that in BAT YAML profile generation, primarily
for non-BAT functions.
Test Plan: Updated bolt-address-translation-yaml.test
More information about the llvm-branch-commits
mailing list