[llvm-branch-commits] [BOLT] Emit intra-function control flow in YAMLBAT (PR #76911)

Amir Ayupov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Mar 22 15:47:29 PDT 2024


================
@@ -128,6 +128,26 @@ class BoltAddressTranslation {
   /// Returns BB index by function output address (after BOLT) and basic block
   /// input offset.
   unsigned getBBIndex(uint64_t FuncOutputAddress, uint32_t BBInputOffset) const;
+
+  using BBHashMap = std::map<uint32_t, std::pair<unsigned, size_t>>;
+  /// Return a mapping from basic block input offset to hash and block index for a given function.
+  const BBHashMap &getBBHashMap(uint64_t OutputAddress) const {
+    return FuncHashes.at(OutputAddress).second;
----------------
aaupov wrote:

Addressed in https://github.com/llvm/llvm-project/pull/86353. Will rebase this and follow-up diffs shortly.

https://github.com/llvm/llvm-project/pull/76911


More information about the llvm-branch-commits mailing list