[llvm] [BOLT] Support map other function entry address (PR #101466)

Alexander Yermolovich via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 1 14:21:41 PDT 2024


================
@@ -5509,6 +5509,14 @@ uint64_t RewriteInstance::getNewFunctionOrDataAddress(uint64_t OldAddress) {
   if (const BinaryFunction *BF =
           BC->getBinaryFunctionContainingAddress(OldAddress)) {
     if (BF->isEmitted()) {
+      // If OldAddress is the another entry point of
+      // the function, then BOLT could get the new address.
+      if (BF->isMultiEntry()) {
+        for (auto &BB : *BF)
----------------
ayermolo wrote:

Please specify actual type.
const?

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


More information about the llvm-commits mailing list