[llvm-branch-commits] [mlir] [lldb] [clang] [flang] [libc] [llvm] [clang-tools-extra] [libcxx] [BOLT] Add CallSiteInfo entries in YAMLBAT (PR #76896)

Amir Ayupov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jan 11 14:27:01 PST 2024


https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/76896

>From 3362e9990ee0334ab7073943b4b682764f52bc8f Mon Sep 17 00:00:00 2001
From: Amir Ayupov <aaupov at fb.com>
Date: Thu, 4 Jan 2024 10:40:04 -0800
Subject: [PATCH] Assert that a function exists

Created using spr 1.3.4
---
 bolt/lib/Profile/BoltAddressTranslation.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/bolt/lib/Profile/BoltAddressTranslation.cpp b/bolt/lib/Profile/BoltAddressTranslation.cpp
index dbc9e1702a3016..62f8b777ee91b4 100644
--- a/bolt/lib/Profile/BoltAddressTranslation.cpp
+++ b/bolt/lib/Profile/BoltAddressTranslation.cpp
@@ -521,8 +521,7 @@ std::unordered_map<uint32_t, std::vector<uint32_t>>
 BoltAddressTranslation::getBFBranches(uint64_t OutputAddress) const {
   std::unordered_map<uint32_t, std::vector<uint32_t>> Branches;
   auto FuncIt = Maps.find(OutputAddress);
-  if (FuncIt == Maps.end())
-    return Branches;
+  assert(FuncIt != Maps.end());
   std::vector<uint32_t> InputOffsets;
   for (const auto &KV : FuncIt->second)
     InputOffsets.emplace_back(KV.second);



More information about the llvm-branch-commits mailing list