[llvm] [BOLT] Record return profile as call to continuation fallthrough (PR #109486)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 21 10:08:06 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 4b4ea6d84bddb5e7b3f144d18630390755e8f7b6 5f48b9253844f970245a7e46c85bb5343b0efc4c --extensions h,cpp -- bolt/include/bolt/Profile/DataAggregator.h bolt/lib/Profile/DataAggregator.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/bolt/lib/Profile/DataAggregator.cpp b/bolt/lib/Profile/DataAggregator.cpp
index f73c966ec0..dbd0ed07c7 100644
--- a/bolt/lib/Profile/DataAggregator.cpp
+++ b/bolt/lib/Profile/DataAggregator.cpp
@@ -858,12 +858,12 @@ bool DataAggregator::doTrace(const uint64_t From, const uint64_t To,
BAT ? BAT->getFallthroughsInTrace(FromFunc->getAddress(), From, To)
: getFallthroughsInTrace(*FromFunc, From, To, Count);
if (!FTs) {
- LLVM_DEBUG(
- dbgs() << "Invalid trace starting in " << FromFunc->getPrintName()
- << " @ " << Twine::utohexstr(From - FromFunc->getAddress())
- << " and ending in " << ToFunc->getPrintName() << " @ "
- << ToFunc->getPrintName() << " @ "
- << Twine::utohexstr(To - ToFunc->getAddress()) << '\n');
+ LLVM_DEBUG(dbgs() << "Invalid trace starting in "
+ << FromFunc->getPrintName() << " @ "
+ << Twine::utohexstr(From - FromFunc->getAddress())
+ << " and ending in " << ToFunc->getPrintName() << " @ "
+ << ToFunc->getPrintName() << " @ "
+ << Twine::utohexstr(To - ToFunc->getAddress()) << '\n');
NumInvalidTraces += Count;
return false;
}
@@ -1582,7 +1582,7 @@ void DataAggregator::processBranchEvents() {
NamedRegionTimer T("processBranch", "Processing branch events",
TimerGroupName, TimerGroupDesc, opts::TimeAggregator);
- for (const auto &[Loc, Info]: FallthroughLBRs) {
+ for (const auto &[Loc, Info] : FallthroughLBRs) {
if (Info.InternCount)
doTrace(Loc.From, Loc.To, Info.InternCount);
if (Info.ExternCount) {
@@ -1750,7 +1750,7 @@ void DataAggregator::processPreAggregated() {
TimerGroupName, TimerGroupDesc, opts::TimeAggregator);
uint64_t NumTraces = 0;
- for (const auto &[From, To, Count, Mispreds, Type]: AggregatedLBRs) {
+ for (const auto &[From, To, Count, Mispreds, Type] : AggregatedLBRs) {
bool IsExternalOrigin = Type == AggregatedLBREntry::FT_EXTERNAL_ORIGIN;
switch (Type) {
case AggregatedLBREntry::BRANCH:
``````````
</details>
https://github.com/llvm/llvm-project/pull/109486
More information about the llvm-commits
mailing list