[all-commits] [llvm/llvm-project] 2ccf7e: [JITLink] Switch to SymbolStringPtr for Symbol nam...

Jared Wyles via All-commits all-commits at lists.llvm.org
Thu Dec 5 15:22:31 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2ccf7ed277df28651b94bbee9fccefdf22fb074f
      https://github.com/llvm/llvm-project/commit/2ccf7ed277df28651b94bbee9fccefdf22fb074f
  Author: Jared Wyles <jared.wyles at gmail.com>
  Date:   2024-12-06 (Fri, 06 Dec 2024)

  Changed paths:
    M .gitignore
    M bolt/include/bolt/Core/BinaryContext.h
    M bolt/lib/Core/BinaryContext.cpp
    M bolt/lib/Rewrite/DWARFRewriter.cpp
    M bolt/lib/Rewrite/JITLinkLinker.cpp
    M bolt/lib/Rewrite/MachORewriteInstance.cpp
    M bolt/lib/Rewrite/RewriteInstance.cpp
    M bolt/unittests/Core/BinaryContext.cpp
    M bolt/unittests/Core/MCPlusBuilder.cpp
    M bolt/unittests/Core/MemoryMaps.cpp
    M llvm/include/llvm/ExecutionEngine/JITLink/COFF.h
    M llvm/include/llvm/ExecutionEngine/JITLink/COFF_x86_64.h
    M llvm/include/llvm/ExecutionEngine/JITLink/ELF.h
    M llvm/include/llvm/ExecutionEngine/JITLink/ELF_aarch32.h
    M llvm/include/llvm/ExecutionEngine/JITLink/ELF_aarch64.h
    M llvm/include/llvm/ExecutionEngine/JITLink/ELF_i386.h
    M llvm/include/llvm/ExecutionEngine/JITLink/ELF_loongarch.h
    M llvm/include/llvm/ExecutionEngine/JITLink/ELF_ppc64.h
    M llvm/include/llvm/ExecutionEngine/JITLink/ELF_riscv.h
    M llvm/include/llvm/ExecutionEngine/JITLink/ELF_x86_64.h
    M llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
    M llvm/include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h
    M llvm/include/llvm/ExecutionEngine/JITLink/MachO.h
    M llvm/include/llvm/ExecutionEngine/JITLink/MachO_arm64.h
    M llvm/include/llvm/ExecutionEngine/JITLink/MachO_x86_64.h
    M llvm/include/llvm/ExecutionEngine/JITLink/TableManager.h
    M llvm/include/llvm/ExecutionEngine/Orc/ExecutorProcessControl.h
    M llvm/include/llvm/ExecutionEngine/RuntimeDyldChecker.h
    M llvm/lib/ExecutionEngine/JITLink/COFF.cpp
    M llvm/lib/ExecutionEngine/JITLink/COFFLinkGraphBuilder.cpp
    M llvm/lib/ExecutionEngine/JITLink/COFFLinkGraphBuilder.h
    M llvm/lib/ExecutionEngine/JITLink/COFF_x86_64.cpp
    M llvm/lib/ExecutionEngine/JITLink/DefineExternalSectionStartAndEndSymbols.h
    M llvm/lib/ExecutionEngine/JITLink/ELF.cpp
    M llvm/lib/ExecutionEngine/JITLink/ELFLinkGraphBuilder.h
    M llvm/lib/ExecutionEngine/JITLink/ELF_aarch32.cpp
    M llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp
    M llvm/lib/ExecutionEngine/JITLink/ELF_i386.cpp
    M llvm/lib/ExecutionEngine/JITLink/ELF_loongarch.cpp
    M llvm/lib/ExecutionEngine/JITLink/ELF_ppc64.cpp
    M llvm/lib/ExecutionEngine/JITLink/ELF_riscv.cpp
    M llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
    M llvm/lib/ExecutionEngine/JITLink/JITLink.cpp
    M llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp
    M llvm/lib/ExecutionEngine/JITLink/JITLinkMemoryManager.cpp
    M llvm/lib/ExecutionEngine/JITLink/MachO.cpp
    M llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp
    M llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.h
    M llvm/lib/ExecutionEngine/JITLink/MachO_arm64.cpp
    M llvm/lib/ExecutionEngine/JITLink/MachO_x86_64.cpp
    M llvm/lib/ExecutionEngine/JITLink/PerGraphGOTAndPLTStubsBuilder.h
    M llvm/lib/ExecutionEngine/JITLink/aarch32.cpp
    M llvm/lib/ExecutionEngine/Orc/COFFPlatform.cpp
    M llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp
    M llvm/lib/ExecutionEngine/Orc/Debugging/DebuggerSupportPlugin.cpp
    M llvm/lib/ExecutionEngine/Orc/Debugging/PerfSupportPlugin.cpp
    M llvm/lib/ExecutionEngine/Orc/Debugging/VTuneSupportPlugin.cpp
    M llvm/lib/ExecutionEngine/Orc/ELFNixPlatform.cpp
    M llvm/lib/ExecutionEngine/Orc/EPCIndirectionUtils.cpp
    M llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
    M llvm/lib/ExecutionEngine/Orc/JITLinkRedirectableSymbolManager.cpp
    M llvm/lib/ExecutionEngine/Orc/LazyObjectLinkingLayer.cpp
    M llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp
    M llvm/lib/ExecutionEngine/Orc/ObjectFileInterface.cpp
    M llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp
    M llvm/lib/ExecutionEngine/Orc/SectCreate.cpp
    M llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
    M llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
    M llvm/tools/llvm-jitlink/llvm-jitlink.cpp
    M llvm/tools/llvm-jitlink/llvm-jitlink.h
    M llvm/unittests/ExecutionEngine/JITLink/AArch32ErrorTests.cpp
    M llvm/unittests/ExecutionEngine/JITLink/EHFrameSupportTests.cpp
    M llvm/unittests/ExecutionEngine/JITLink/JITLinkTestUtils.cpp
    M llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp
    M llvm/unittests/ExecutionEngine/JITLink/MachOLinkGraphTests.cpp
    M llvm/unittests/ExecutionEngine/JITLink/MemoryManagerErrorTests.cpp
    M llvm/unittests/ExecutionEngine/JITLink/StubsTests.cpp
    M llvm/unittests/ExecutionEngine/Orc/EPCGenericJITLinkMemoryManagerTest.cpp
    M llvm/unittests/ExecutionEngine/Orc/JITLinkRedirectionManagerTest.cpp
    M llvm/unittests/ExecutionEngine/Orc/MapperJITLinkMemoryManagerTest.cpp
    M llvm/unittests/ExecutionEngine/Orc/ObjectLinkingLayerTest.cpp

  Log Message:
  -----------
  [JITLink] Switch to SymbolStringPtr for Symbol names (#115796)

Use SymbolStringPtr for Symbol names in LinkGraph. This reduces string interning
on the boundary between JITLink and ORC, and allows pointer comparisons (rather
than string comparisons) between Symbol names. This should improve the
performance and readability of code that bridges between JITLink and ORC (e.g.
ObjectLinkingLayer and ObjectLinkingLayer::Plugins).

To enable use of SymbolStringPtr a std::shared_ptr<SymbolStringPool> is added to
LinkGraph and threaded through to its construction sites in LLVM and Bolt. All
LinkGraphs that are to have symbol names compared by pointer equality must point
to the same SymbolStringPool instance, which in ORC sessions should be the pool
attached to the ExecutionSession.
---------

Co-authored-by: Lang Hames <lhames at gmail.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list