[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
Tue May 20 01:39:37 PDT 2025


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `flang-aarch64-sharedlibs` running on `linaro-flang-aarch64-sharedlibs` while building `llvm` at step 5 "build-unified-tree".

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

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

```
Step 5 (build-unified-tree) failure: build (failure)
...
209.184 [4390/1/3209] Creating library symlink lib/libLLVMSymbolize.so
209.431 [4389/1/3210] Linking CXX shared library lib/libLLVMDebuginfod.so.21.0git
209.453 [4388/1/3211] Creating library symlink lib/libLLVMDebuginfod.so
209.682 [4387/1/3212] Linking CXX shared library lib/libLLVMDWP.so.21.0git
209.855 [4386/1/3213] Creating library symlink lib/libLLVMDWP.so
210.177 [4385/1/3214] Linking CXX shared library lib/libLLVMJITLink.so.21.0git
210.207 [4384/1/3215] Creating library symlink lib/libLLVMJITLink.so
210.501 [4383/1/3216] Linking CXX shared library lib/libLLVMRuntimeDyld.so.21.0git
210.520 [4382/1/3217] Creating library symlink lib/libLLVMRuntimeDyld.so
210.825 [4381/1/3218] Linking CXX shared library lib/libLLVMProfileData.so.21.0git
FAILED: lib/libLLVMProfileData.so.21.0git 
: && /usr/local/bin/c++ -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   -Wl,-rpath-link,/home/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/./lib  -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/tcwg-buildbot/worker/flang-aarch64-sharedlibs/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/tcwg-buildbot/worker/flang-aarch64-sharedlibs/build/lib && :
/usr/bin/ld: lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o: in function `llvm::getIRPGOFuncName[abi:cxx11](llvm::Function const&, bool)':
InstrProf.cpp:(.text._ZN4llvm16getIRPGOFuncNameB5cxx11ERKNS_8FunctionEb+0x28): undefined reference to `llvm::Value::getMetadata(llvm::StringRef) const'
/usr/bin/ld: lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o: in function `llvm::getIRPGOObjectName[abi:cxx11](llvm::GlobalObject const&, bool, llvm::MDNode*)':
InstrProf.cpp:(.text._ZN4llvmL18getIRPGOObjectNameB5cxx11ERKNS_12GlobalObjectEbPNS_6MDNodeE+0x138): undefined reference to `llvm::Value::getName() const'
/usr/bin/ld: InstrProf.cpp:(.text._ZN4llvmL18getIRPGOObjectNameB5cxx11ERKNS_12GlobalObjectEbPNS_6MDNodeE+0x168): undefined reference to `llvm::GlobalValue::getGlobalIdentifier[abi:cxx11](llvm::StringRef, llvm::GlobalValue::LinkageTypes, llvm::StringRef)'
/usr/bin/ld: InstrProf.cpp:(.text._ZN4llvmL18getIRPGOObjectNameB5cxx11ERKNS_12GlobalObjectEbPNS_6MDNodeE+0x1b8): undefined reference to `llvm::Value::getName() const'
/usr/bin/ld: InstrProf.cpp:(.text._ZN4llvmL18getIRPGOObjectNameB5cxx11ERKNS_12GlobalObjectEbPNS_6MDNodeE+0x1d0): undefined reference to `llvm::GlobalValue::getGlobalIdentifier[abi:cxx11](llvm::StringRef, llvm::GlobalValue::LinkageTypes, llvm::StringRef)'
/usr/bin/ld: lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o: in function `llvm::getPGOFuncNameMetadata(llvm::Function const&)':
InstrProf.cpp:(.text._ZN4llvm22getPGOFuncNameMetadataERKNS_8FunctionE+0xc): undefined reference to `llvm::Value::getMetadata(llvm::StringRef) const'
/usr/bin/ld: lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o: in function `llvm::getPGOFuncName[abi:cxx11](llvm::Function const&, bool, unsigned long)':
InstrProf.cpp:(.text._ZN4llvm14getPGOFuncNameB5cxx11ERKNS_8FunctionEbm+0x3c): undefined reference to `llvm::Value::getMetadata(llvm::StringRef) const'
/usr/bin/ld: InstrProf.cpp:(.text._ZN4llvm14getPGOFuncNameB5cxx11ERKNS_8FunctionEbm+0x148): undefined reference to `llvm::Value::getName() const'
/usr/bin/ld: InstrProf.cpp:(.text._ZN4llvm14getPGOFuncNameB5cxx11ERKNS_8FunctionEbm+0x1cc): undefined reference to `llvm::Value::getName() const'
/usr/bin/ld: lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o: in function `llvm::lookupPGONameFromMetadata[abi:cxx11](llvm::MDNode*)':
InstrProf.cpp:(.text._ZN4llvmL25lookupPGONameFromMetadataB5cxx11EPNS_6MDNodeE+0x70): undefined reference to `llvm::MDString::getString() const'
/usr/bin/ld: lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o: in function `llvm::getPGOName[abi:cxx11](llvm::GlobalVariable const&, bool)':
InstrProf.cpp:(.text._ZN4llvm10getPGONameB5cxx11ERKNS_14GlobalVariableEb+0x28): undefined reference to `llvm::Value::getMetadata(llvm::StringRef) const'
/usr/bin/ld: lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o: in function `llvm::createPGOFuncNameVar(llvm::Module&, llvm::GlobalValue::LinkageTypes, llvm::StringRef)':
InstrProf.cpp:(.text._ZN4llvm20createPGOFuncNameVarERNS_6ModuleENS_11GlobalValue12LinkageTypesENS_9StringRefE+0xac): undefined reference to `llvm::ConstantDataArray::getString(llvm::LLVMContext&, llvm::StringRef, bool)'
/usr/bin/ld: InstrProf.cpp:(.text._ZN4llvm20createPGOFuncNameVarERNS_6ModuleENS_11GlobalValue12LinkageTypesENS_9StringRefE+0xbc): undefined reference to `llvm::User::operator new(unsigned long, llvm::User::IntrusiveOperandsAllocMarker)'
/usr/bin/ld: InstrProf.cpp:(.text._ZN4llvm20createPGOFuncNameVarERNS_6ModuleENS_11GlobalValue12LinkageTypesENS_9StringRefE+0x118): undefined reference to `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)'
/usr/bin/ld: lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o: in function `llvm::InstrProfSymtab::create(llvm::Module&, bool, bool)':
InstrProf.cpp:(.text._ZN4llvm15InstrProfSymtab6createERNS_6ModuleEbb+0x84): undefined reference to `llvm::Value::getMetadata(llvm::StringRef) const'
/usr/bin/ld: InstrProf.cpp:(.text._ZN4llvm15InstrProfSymtab6createERNS_6ModuleEbb+0x1bc): undefined reference to `llvm::Value::getMetadataImpl(unsigned int) const'
/usr/bin/ld: InstrProf.cpp:(.text._ZN4llvm15InstrProfSymtab6createERNS_6ModuleEbb+0x1d0): undefined reference to `llvm::Value::getMetadata(llvm::StringRef) const'
/usr/bin/ld: lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o: in function `llvm::InstrProfSymtab::addVTableWithName(llvm::GlobalVariable&, llvm::StringRef)::$_0::operator()(llvm::StringRef) const':
InstrProf.cpp:(.text._ZZN4llvm15InstrProfSymtab17addVTableWithNameERNS_14GlobalVariableENS_9StringRefEENK3$_0clES3_+0x84): undefined reference to `llvm::GlobalValue::getGUIDAssumingExternalLinkage(llvm::StringRef)'
/usr/bin/ld: lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o: in function `llvm::InstrProfSymtab::addFuncWithName(llvm::Function&, llvm::StringRef, bool)::$_0::operator()(llvm::StringRef) const':
InstrProf.cpp:(.text._ZZN4llvm15InstrProfSymtab15addFuncWithNameERNS_8FunctionENS_9StringRefEbENK3$_0clES3_+0x78): undefined reference to `llvm::GlobalValue::getGUIDAssumingExternalLinkage(llvm::StringRef)'
/usr/bin/ld: lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o: in function `llvm::getPGOFuncNameVarInitializer(llvm::GlobalVariable*)':
InstrProf.cpp:(.text._ZN4llvm28getPGOFuncNameVarInitializerEPNS_14GlobalVariableE+0x10): undefined reference to `llvm::GlobalValue::isDeclaration() const'
/usr/bin/ld: InstrProf.cpp:(.text._ZN4llvm28getPGOFuncNameVarInitializerEPNS_14GlobalVariableE+0x30): undefined reference to `llvm::ConstantDataSequential::isCString() const'
/usr/bin/ld: InstrProf.cpp:(.text._ZN4llvm28getPGOFuncNameVarInitializerEPNS_14GlobalVariableE+0x50): undefined reference to `llvm::ConstantDataSequential::isString(unsigned int) const'
/usr/bin/ld: InstrProf.cpp:(.text._ZN4llvm28getPGOFuncNameVarInitializerEPNS_14GlobalVariableE+0x64): undefined reference to `llvm::ConstantDataSequential::getRawDataValues() const'
/usr/bin/ld: lib/ProfileData/CMakeFiles/LLVMProfileData.dir/InstrProf.cpp.o: in function `llvm::ConstantDataSequential::getAsCString() const':
InstrProf.cpp:(.text._ZNK4llvm22ConstantDataSequential12getAsCStringEv[_ZNK4llvm22ConstantDataSequential12getAsCStringEv]+0x10): undefined reference to `llvm::ConstantDataSequential::isCString() const'
/usr/bin/ld: InstrProf.cpp:(.text._ZNK4llvm22ConstantDataSequential12getAsCStringEv[_ZNK4llvm22ConstantDataSequential12getAsCStringEv]+0x20): undefined reference to `llvm::ConstantDataSequential::isString(unsigned int) const'

```

</details>

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


More information about the llvm-commits mailing list