[all-commits] [llvm/llvm-project] 6613f4: [ORC] Use raw OS handle values, ExecutorAddr for E...

lhames via All-commits all-commits at lists.llvm.org
Mon Oct 24 14:16:35 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6613f4aff85b24a13d4f5f7e9cd24bf3f44037a3
      https://github.com/llvm/llvm-project/commit/6613f4aff85b24a13d4f5f7e9cd24bf3f44037a3
  Author: Lang Hames <lhames at gmail.com>
  Date:   2022-10-24 (Mon, 24 Oct 2022)

  Changed paths:
    M llvm/include/llvm/ExecutionEngine/Orc/Shared/OrcRTBridge.h
    M llvm/include/llvm/ExecutionEngine/Orc/Shared/TargetProcessControlTypes.h
    M llvm/include/llvm/ExecutionEngine/Orc/TargetProcess/SimpleExecutorDylibManager.h
    M llvm/include/llvm/Support/DynamicLibrary.h
    M llvm/lib/ExecutionEngine/Orc/EPCDynamicLibrarySearchGenerator.cpp
    M llvm/lib/ExecutionEngine/Orc/EPCGenericDylibManager.cpp
    M llvm/lib/ExecutionEngine/Orc/ExecutorProcessControl.cpp
    M llvm/lib/ExecutionEngine/Orc/LookupAndRecordAddrs.cpp
    M llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp
    M llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorDylibManager.cpp

  Log Message:
  -----------
  [ORC] Use raw OS handle values, ExecutorAddr for EPC dylib handles.

Updates tpctypes::DylibHandle to be an ExecutorAddr (rather than a uint64_t),
and SimpleExecutorDylibManager to hold and return raw OS handle values (as
ExecutorAddrs) rather than index values into a map of DynamicLibrary instances.

This will allow clients to use EPCGenericDylibManager in contexts where the
existing DynamicLibrary interface is too limited to be used. (e.g. to look up
JIT symbols in a dylib that was loaded with RTLD_LOCAL).


  Commit: c977251ef6fee3f7045039832331e8aab1e0a1b2
      https://github.com/llvm/llvm-project/commit/c977251ef6fee3f7045039832331e8aab1e0a1b2
  Author: Lang Hames <lhames at gmail.com>
  Date:   2022-10-24 (Mon, 24 Oct 2022)

  Changed paths:
    M llvm/include/llvm/ExecutionEngine/Orc/EPCEHFrameRegistrar.h
    M llvm/lib/ExecutionEngine/Orc/EPCEHFrameRegistrar.cpp

  Log Message:
  -----------
  [ORC] Allow EPCEHFrameRegistrar clients to specify registration function dylib.

Previously, EPCEHFrameRegistrar always used the
ExecutorProcessControl::loadDylib(nullptr) method to obtain a handle for the
process, but this doesn't work if the registration functions aren't visible in
a standard search of the process (e.g. if the JIT is in a plugin that is loaded
with RTLD_LOCAL).

This patch retains the old behavior by default, but allows clients to supply
their own handle for the library containing the registration functions if they
need to (e.g. to work around limitations like RDLD_LOCAL above, which aren't
expressible within the existing loadDylib / DynamicLibrary APIs).


Compare: https://github.com/llvm/llvm-project/compare/5dcfc3282282...c977251ef6fe


More information about the All-commits mailing list