[all-commits] [llvm/llvm-project] b5c862: [JITLink] Store Sections in a DenseMap with the se...

lhames via All-commits all-commits at lists.llvm.org
Fri Mar 17 20:22:09 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b5c862e15caf4d8aa34bbc6ee25af8da9a9405a4
      https://github.com/llvm/llvm-project/commit/b5c862e15caf4d8aa34bbc6ee25af8da9a9405a4
  Author: Lang Hames <lhames at gmail.com>
  Date:   2023-03-17 (Fri, 17 Mar 2023)

  Changed paths:
    M llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
    M llvm/test/ExecutionEngine/JITLink/X86/COFF_comdat_associative_dead_strip.test

  Log Message:
  -----------
  [JITLink] Store Sections in a DenseMap with the section name as key.

This speeds up section lookup by name.

This change was motivated by poor performance of a testcase while trying to fix
the NoAlloc lifetime patch that was originally landed as 2cc64df0bd6. The
NoAlloc lifetime patch causes ELF non-SHF_ALLOC sections to be given a JITLink
Section (previously they were skipped), and the
llvm/test/ExecutionEngine/JITLink/X86/ELF_shndex.s testcase creates > 64k
non-SHF_ALLOC sections, each of which now needs to be checked to ensure that its
name does not clash. Moving to a DenseMap allows us to implement this check
efficiently.




More information about the All-commits mailing list