[all-commits] [llvm/llvm-project] 84fe1f: [ORC] Switch to singleton pattern for UnwindInfoMa...

Lang Hames via All-commits all-commits at lists.llvm.org
Tue Feb 11 15:00:38 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 84fe1f63b02414085bf7a8434caaf4a358be86da
      https://github.com/llvm/llvm-project/commit/84fe1f63b02414085bf7a8434caaf4a358be86da
  Author: Lang Hames <lhames at gmail.com>
  Date:   2025-02-12 (Wed, 12 Feb 2025)

  Changed paths:
    M llvm/include/llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h
    M llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.h
    M llvm/include/llvm/ExecutionEngine/Orc/UnwindInfoRegistrationPlugin.h
    M llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp
    M llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
    M llvm/lib/ExecutionEngine/Orc/Shared/OrcRTBridge.cpp
    M llvm/lib/ExecutionEngine/Orc/TargetProcess/UnwindInfoManager.cpp
    M llvm/lib/ExecutionEngine/Orc/UnwindInfoRegistrationPlugin.cpp
    M llvm/tools/llvm-jitlink/llvm-jitlink-executor/llvm-jitlink-executor.cpp
    M llvm/tools/llvm-jitlink/llvm-jitlink.cpp

  Log Message:
  -----------
  [ORC] Switch to singleton pattern for UnwindInfoManager. (#126691)

The find-dynamic-unwind-info callback registration APIs in libunwind
limit the number of callbacks that can be registered. If we use multiple
UnwindInfoManager instances, each with their own own callback function
(as was the case prior to this patch) we can quickly exceed this limit
(see https://github.com/llvm/llvm-project/issues/126611).

This patch updates the UnwindInfoManager class to use a singleton
pattern, with the single instance shared between all LLVM JITs in the
process.

This change does _not_ apply to compact unwind info registered through
the ORC runtime (which currently installs its own callbacks).

As a bonus this change eliminates the need to load an IR "bouncer"
module to supply the unique callback for each instance, so support for
compact-unwind can be extended to the llvm-jitlink tools (which does not
support adding IR).



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