[llvm] [NFC][MemProf] Move types shared between Analysis, ProfileData and ModuleSummary (Core) to a separate header (PR #140505)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Mon May 19 19:57:21 PDT 2025


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `bolt-aarch64-ubuntu-clang-shared` running on `bolt-worker-aarch64` while building `llvm` at step 7 "build-bolt".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/126/builds/3652

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 7 (build-bolt) failure: build (failure)
...
161.673 [80/4/2098] Creating library symlink lib/libLLVMJITLink.so
161.674 [80/3/2099] Linking CXX shared library lib/libLLVMDebugInfoPDB.so.21.0git
161.674 [79/3/2100] Linking CXX shared library lib/libLLVMObjectYAML.so.21.0git
161.683 [78/3/2101] Creating library symlink lib/libLLVMDebugInfoPDB.so
161.683 [78/2/2102] Creating library symlink lib/libLLVMObjectYAML.so
161.711 [78/1/2103] Linking CXX shared library lib/libLLVMDebugInfoGSYM.so.21.0git
161.720 [77/1/2104] Creating library symlink lib/libLLVMDebugInfoGSYM.so
161.757 [76/1/2105] Linking CXX shared library lib/libLLVMSymbolize.so.21.0git
161.766 [75/1/2106] Creating library symlink lib/libLLVMSymbolize.so
161.807 [74/1/2107] Linking CXX shared library lib/libLLVMProfileData.so.21.0git
FAILED: lib/libLLVMProfileData.so.21.0git 
: && /usr/bin/clang++ -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete -fuse-ld=mold -Wl,--color-diagnostics   -Wl,--gc-sections -shared -Wl,-soname,libLLVMProfileData.so.21.0git -o lib/libLLVMProfileData.so.21.0git lib/ProfileData/CMakeFiles/LLVMProfileData.dir/DataAccessProf.cpp.o lib/ProfileData/CMakeFiles/LLVMProfileData.dir/GCOV.cpp.o lib/ProfileData/CMakeFiles/LLVMProfileData.dir/IndexedMemProfData.cpp.o lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProfCorrelator.cpp.o lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProfReader.cpp.o lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProfWriter.cpp.o lib/ProfileData/CMakeFiles/LLVMProfileData.dir/ItaniumManglingCanonicalizer.cpp.o lib/ProfileData/CMakeFiles/LLVMProfileData.dir/MemProf.cpp.o lib/ProfileData/CMakeFiles/LLVMProfileData.dir/MemProfReader.cpp.o lib/ProfileData/CMakeFiles/LLVMProfileData.dir/MemProfRadixTree.cpp.o lib/ProfileData/CMakeFiles/LLVMProfileData.dir/PGOCtxProfReader.cpp.o lib/ProfileData/CMakeFiles/LLVMProfileData.dir/PGOCtxProfWriter.cpp.o lib/ProfileData/CMakeFiles/LLVMProfileData.dir/ProfileSummaryBuilder.cpp.o lib/ProfileData/CMakeFiles/LLVMProfileData.dir/SampleProf.cpp.o lib/ProfileData/CMakeFiles/LLVMProfileData.dir/SampleProfReader.cpp.o lib/ProfileData/CMakeFiles/LLVMProfileData.dir/SampleProfWriter.cpp.o lib/ProfileData/CMakeFiles/LLVMProfileData.dir/SymbolRemappingReader.cpp.o  -Wl,-rpath,"\$ORIGIN/../lib:/home/worker/buildbot-aarch64/bolt-aarch64-ubuntu-clang-shared/build/lib:"  lib/libLLVMSymbolize.so.21.0git  lib/libLLVMDebugInfoDWARF.so.21.0git  lib/libLLVMObject.so.21.0git  lib/libLLVMBitstreamReader.so.21.0git  lib/libLLVMTargetParser.so.21.0git  lib/libLLVMSupport.so.21.0git  lib/libLLVMDemangle.so.21.0git  -Wl,-rpath-link,/home/worker/buildbot-aarch64/bolt-aarch64-ubuntu-clang-shared/build/lib && :
mold: error: undefined symbol: llvm::ConstantDataSequential::getRawDataValues() const
>>> referenced by InstrProf.cpp
>>>               lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o:(llvm::getPGOFuncNameVarInitializer(llvm::GlobalVariable*))>>> referenced by InstrProf.cpp
>>>               lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o:(llvm::ConstantDataSequential::getAsCString() const)
mold: error: undefined symbol: llvm::LLVMContext::diagnose(llvm::DiagnosticInfo const&)
>>> referenced by SampleProfReader.cpp
>>>               lib/ProfileData/CMakeFiles/LLVMProfileData.dir/SampleProfReader.cpp.o:(llvm::sampleprof::SampleProfileReaderText::readImpl())>>> referenced by SampleProfReader.cpp
>>>               lib/ProfileData/CMakeFiles/LLVMProfileData.dir/SampleProfReader.cpp.o:(llvm::sampleprof::SampleProfileReaderText::readImpl())>>> referenced by SampleProfReader.cpp
>>>               lib/ProfileData/CMakeFiles/LLVMProfileData.dir/SampleProfReader.cpp.o:(llvm::sampleprof::SampleProfileReaderText::readImpl())>>> referenced 11 more times

mold: error: undefined symbol: llvm::Value::getMetadata(llvm::StringRef) const
>>> referenced by InstrProf.cpp
>>>               lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o:(llvm::getIRPGOFuncName[abi:cxx11](llvm::Function const&, bool))>>> referenced by InstrProf.cpp
>>>               lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o:(llvm::getPGOFuncNameMetadata(llvm::Function const&))>>> referenced by InstrProf.cpp
>>>               lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o:(llvm::getPGOFuncName[abi:cxx11](llvm::Function const&, bool, unsigned long))>>> referenced 5 more times

mold: error: undefined symbol: llvm::Value::getContext() const
>>> referenced by InstrProf.cpp
>>>               lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o:(llvm::createPGONameMetadata(llvm::GlobalObject&, llvm::StringRef, llvm::StringRef))
mold: error: undefined symbol: llvm::Instruction::setMetadata(unsigned int, llvm::MDNode*)
>>> referenced by InstrProf.cpp
>>>               lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o:(llvm::annotateValueSite(llvm::Module&, llvm::Instruction&, llvm::ArrayRef<InstrProfValueData>, unsigned long, llvm::InstrProfValueKind, unsigned int))
mold: error: undefined symbol: llvm::GlobalVariable::GlobalVariable(llvm::Module&, llvm::Type*, bool, llvm::GlobalValue::LinkageTypes, llvm::Constant*, llvm::Twine const&, llvm::GlobalVariable*, llvm::GlobalValue::ThreadLocalMode, std::optional<unsigned int>, bool)
>>> referenced by InstrProf.cpp
>>>               lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o:(llvm::createPGOFuncNameVar(llvm::Module&, llvm::GlobalValue::LinkageTypes, llvm::StringRef))>>> referenced by InstrProf.cpp
>>>               lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o:(llvm::createProfileFileNameVar(llvm::Module&, llvm::StringRef))
mold: error: undefined symbol: llvm::GlobalValue::getGUIDAssumingExternalLinkage(llvm::StringRef)
>>> referenced by MemProf.cpp
>>>               lib/ProfileData/CMakeFiles/LLVMProfileData.dir/MemProf.cpp.o:(llvm::memprof::getGUID(llvm::StringRef))>>> referenced by SampleProf.cpp
>>>               lib/ProfileData/CMakeFiles/LLVMProfileData.dir/SampleProf.cpp.o:(llvm::sampleprof::FunctionSamples::findFunctionSamplesAt(llvm::sampleprof::LineLocation const&, llvm::StringRef, llvm::sampleprof::SampleProfileReaderItaniumRemapper*, llvm::sampleprof::HashKeyMap<std::unordered_map, llvm::sampleprof::FunctionId, llvm::sampleprof::FunctionId> const*) const)>>> referenced by SampleProf.cpp
>>>               lib/ProfileData/CMakeFiles/LLVMProfileData.dir/SampleProf.cpp.o:(llvm::sampleprof::FunctionSamples::findFunctionSamplesAt(llvm::sampleprof::LineLocation const&, llvm::StringRef, llvm::sampleprof::SampleProfileReaderItaniumRemapper*, llvm::sampleprof::HashKeyMap<std::unordered_map, llvm::sampleprof::FunctionId, llvm::sampleprof::FunctionId> const*) const)>>> referenced 5 more times

mold: error: undefined symbol: llvm::ConstantDataSequential::isCString() const
>>> referenced by InstrProf.cpp
>>>               lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o:(llvm::getPGOFuncNameVarInitializer(llvm::GlobalVariable*))>>> referenced by InstrProf.cpp
>>>               lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o:(llvm::ConstantDataSequential::getAsCString() const)
mold: error: undefined symbol: llvm::Function::getFnAttribute(llvm::StringRef) const

```

</details>

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


More information about the llvm-commits mailing list