[all-commits] [llvm/llvm-project] db29f2: [BOLT] Ignore returns in DataAggregator
Amir Ayupov via All-commits
all-commits at lists.llvm.org
Wed May 8 12:02:39 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: db29f20fdd4f715553f663f21021330cb4497e00
https://github.com/llvm/llvm-project/commit/db29f20fdd4f715553f663f21021330cb4497e00
Author: Amir Ayupov <aaupov at fb.com>
Date: 2024-05-08 (Wed, 08 May 2024)
Changed paths:
M bolt/include/bolt/Core/BinaryFunction.h
M bolt/lib/Core/BinaryFunction.cpp
M bolt/lib/Profile/DataAggregator.cpp
M bolt/test/X86/bolt-address-translation-yaml.test
Log Message:
-----------
[BOLT] Ignore returns in DataAggregator
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 robust to staleness but requires disassembling the
branch source instruction.
Test Plan: Updated bolt-address-translation-yaml.test
Reviewers: rafaelauler, dcci, ayermolo, maksfb
Reviewed By: maksfb
Pull Request: https://github.com/llvm/llvm-project/pull/90807
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list