[llvm-branch-commits] [llvm] [BOLT] Set EntryDiscriminator in YAML profile for indirect calls (PR #82128)
Amir Ayupov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Mar 27 14:48:20 PDT 2024
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/82128
>From f46d68517b6d0804f56a087c86c20c9bc3a08a0f Mon Sep 17 00:00:00 2001
From: Amir Ayupov <aaupov at meta.com>
Date: Tue, 26 Mar 2024 14:23:09 -0700
Subject: [PATCH 1/2] Update test
Created using spr 1.3.4
---
bolt/test/X86/yaml-indirect-call-discriminator.s | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bolt/test/X86/yaml-indirect-call-discriminator.s b/bolt/test/X86/yaml-indirect-call-discriminator.s
index 172eba6dc31c07..c7678b3811834d 100644
--- a/bolt/test/X86/yaml-indirect-call-discriminator.s
+++ b/bolt/test/X86/yaml-indirect-call-discriminator.s
@@ -44,7 +44,7 @@ main:
testq %rax, %rax
jne Lindcall
Lcall:
- call secondary_entry
+ call func
# FDATA: 1 main #Lcall# 1 func 0 1 1
Lindcall:
callq *%rax
>From 70c242d63b6aa862eba2bb5b03ec1eb6602e0f31 Mon Sep 17 00:00:00 2001
From: Amir Ayupov <aaupov at meta.com>
Date: Tue, 26 Mar 2024 18:30:40 -0700
Subject: [PATCH 2/2] Align secondary entry enumeration in getSymbolForEntryID
with getEntryIDForSymbol
Created using spr 1.3.4
---
bolt/lib/Core/BinaryFunction.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bolt/lib/Core/BinaryFunction.cpp b/bolt/lib/Core/BinaryFunction.cpp
index 32bf822f077ade..c9e037c225dd41 100644
--- a/bolt/lib/Core/BinaryFunction.cpp
+++ b/bolt/lib/Core/BinaryFunction.cpp
@@ -3547,7 +3547,7 @@ MCSymbol *BinaryFunction::getSymbolForEntryID(uint64_t EntryID) {
if (!isMultiEntry())
return nullptr;
- uint64_t NumEntries = 0;
+ uint64_t NumEntries = 1;
if (hasCFG()) {
for (BinaryBasicBlock *BB : BasicBlocks) {
MCSymbol *EntrySymbol = getSecondaryEntryPointSymbol(*BB);
More information about the llvm-branch-commits
mailing list