From cdc20ff6a7f12464aed70d9b6e67ea07da9f0399 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 9 Jan 2024 21:00:28 +0100 Subject: Merge llvm-project main llvmorg-18-init-16595-g7c00a5be5cde This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvm-project main llvmorg-18-init-16595-g7c00a5be5cde. PR: 276104 MFC after: 1 month (cherry picked from commit 1db9f3b21e39176dd5b67cf8ac378633b172463e) --- contrib/llvm-project/llvm/lib/Object/ELF.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'contrib/llvm-project/llvm/lib/Object/ELF.cpp') diff --git a/contrib/llvm-project/llvm/lib/Object/ELF.cpp b/contrib/llvm-project/llvm/lib/Object/ELF.cpp index 300639f2bfa0..f24395b02043 100644 --- a/contrib/llvm-project/llvm/lib/Object/ELF.cpp +++ b/contrib/llvm-project/llvm/lib/Object/ELF.cpp @@ -774,7 +774,7 @@ decodeBBAddrMapImpl(const ELFFile &EF, } FunctionEntries.emplace_back(Address, std::move(BBEntries)); - if (FeatEnable.FuncEntryCount || FeatEnable.BBFreq || FeatEnable.BrProb) { + if (PGOAnalyses || FeatEnable.anyEnabled()) { // Function entry count uint64_t FuncEntryCount = FeatEnable.FuncEntryCount @@ -782,8 +782,9 @@ decodeBBAddrMapImpl(const ELFFile &EF, : 0; std::vector PGOBBEntries; - for (uint32_t BlockIndex = 0; !MetadataDecodeErr && !ULEBSizeErr && Cur && - (BlockIndex < NumBlocks); + for (uint32_t BlockIndex = 0; + (FeatEnable.BBFreq || FeatEnable.BrProb) && !MetadataDecodeErr && + !ULEBSizeErr && Cur && (BlockIndex < NumBlocks); ++BlockIndex) { // Block frequency uint64_t BBF = FeatEnable.BBFreq -- cgit v1.2.3