================ @@ -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:
Thanks for pointing out. You're right, it does throw an exception: https://en.cppreference.com/w/cpp/container/map/at I had code with `find` and `assert` but switched to `at` for conciseness. Let me unwind that. https://github.com/llvm/llvm-project/pull/76911 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits