[llvm-branch-commits] [llvm] [BOLT] Match blocks with pseudo probes (PR #99891)

2024-07-24 Thread Alexander Yermolovich via llvm-branch-commits
@@ -266,6 +313,65 @@ class StaleMatcher { } return BestBlock; } + // Uses pseudo probe information to attach the profile to the appropriate + // block. + const FlowBlock *matchWithPseudoProbes( + BlendedBlockHash BlendedHash, + const std::vector &PseudoPr

[llvm-branch-commits] [llvm] [BOLT][NFC] Refactor function matching (PR #97502)

2024-07-03 Thread Alexander Yermolovich via llvm-branch-commits
@@ -456,6 +435,39 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) { ++MatchedWithLTOCommonName; } } + return MatchedWithLTOCommonName; +} + +Error YAMLProfileReader::readProfile(BinaryContext &BC) { + if (opts::Verbosity >= 1) { +outs() << "BOLT-INF

[llvm-branch-commits] [llvm] [BOLT][NFC] Refactor function matching (PR #97502)

2024-07-03 Thread Alexander Yermolovich via llvm-branch-commits
@@ -456,6 +435,39 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) { ++MatchedWithLTOCommonName; } } + return MatchedWithLTOCommonName; +} + +Error YAMLProfileReader::readProfile(BinaryContext &BC) { + if (opts::Verbosity >= 1) { +outs() << "BOLT-INF

[llvm-branch-commits] [llvm] [BOLT] Hash-based function matching (PR #95821)

2024-06-20 Thread Alexander Yermolovich via llvm-branch-commits
@@ -374,15 +377,33 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) { // the profile. Function.setExecutionCount(BinaryFunction::COUNT_NO_PROFILE); -// Recompute hash once per function. -if (!opts::IgnoreHash) - Function.computeHash(YamlBP.Header

[llvm-branch-commits] [llvm] [BOLT] Hash-based function matching (PR #95821)

2024-06-20 Thread Alexander Yermolovich via llvm-branch-commits
@@ -374,15 +377,33 @@ Error YAMLProfileReader::readProfile(BinaryContext &BC) { // the profile. Function.setExecutionCount(BinaryFunction::COUNT_NO_PROFILE); -// Recompute hash once per function. -if (!opts::IgnoreHash) - Function.computeHash(YamlBP.Header

[llvm-branch-commits] [llvm] [bolt] Revise IDE folder structure (PR #89742)

2024-05-21 Thread Alexander Yermolovich via llvm-branch-commits
@@ -121,7 +123,7 @@ option(BOLT_BUILD_TOOLS "Build the BOLT tools. If OFF, just generate build targets." ON) add_custom_target(bolt) -set_target_properties(bolt PROPERTIES FOLDER "BOLT") +set_target_properties(bolt PROPERTIES FOLDER "BOLT/Meta") ayermolo wro

[llvm-branch-commits] [BOLT] Use aggregated FuncBranchData in writeBATYAML (PR #91289)

2024-05-13 Thread Alexander Yermolovich via llvm-branch-commits
https://github.com/ayermolo approved this pull request. https://github.com/llvm/llvm-project/pull/91289 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [BOLT] Use aggregated FuncBranchData in writeBATYAML (PR #91289)

2024-05-13 Thread Alexander Yermolovich via llvm-branch-commits
@@ -2386,25 +2362,26 @@ std::error_code DataAggregator::writeBATYAML(BinaryContext &BC, return std::pair(BlockIt->first, BlockIt->second.getBBIndex()); }; - for (const auto &[FromOffset, SuccKV] : Branches.IntraIndex) { -const auto &[_, Index] = get

[llvm-branch-commits] [BOLT][BAT] Fix encoded NumBasicBlocks (PR #87830)

2024-04-05 Thread Alexander Yermolovich via llvm-branch-commits
https://github.com/ayermolo approved this pull request. https://github.com/llvm/llvm-project/pull/87830 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [BOLT][BAT] Fix encoded NumBasicBlocks (PR #87830)

2024-04-05 Thread Alexander Yermolovich via llvm-branch-commits
@@ -426,8 +426,9 @@ void BoltAddressTranslation::dump(raw_ostream &OS) { for (const auto &MapEntry : Maps) { const uint64_t Address = MapEntry.first; const uint64_t HotAddress = fetchParentAddress(Address); +bool IsHotFunction = HotAddress == 0; a

[llvm-branch-commits] [BOLT][BAT] Fix encoded NumBasicBlocks (PR #87830)

2024-04-05 Thread Alexander Yermolovich via llvm-branch-commits
@@ -444,6 +444,8 @@ void BoltAddressTranslation::dump(raw_ostream &OS) { OS << formatv(" hash: {0:x}", BBHashMap.getBBHash(Val)); OS << "\n"; } +if (HotAddress == 0) ayermolo wrote: Can you add a comment on why we output on !HotAddress?

[llvm-branch-commits] [llvm] [BOLT] Use BAT interfaces in YAMLProfileWriter::convert (PR #86219)

2024-03-29 Thread Alexander Yermolovich via llvm-branch-commits
ayermolo wrote: I don't think Test plan in summary is necessary. https://github.com/llvm/llvm-project/pull/86219 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [BOLT][NFC] Simplify YAMLProfileWriter::convert (PR #82129)

2024-02-28 Thread Alexander Yermolovich via llvm-branch-commits
https://github.com/ayermolo approved this pull request. https://github.com/llvm/llvm-project/pull/82129 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits