[all-commits] [llvm/llvm-project] 3507df: [ORC][ORC-RT] Add support for callback-based looku...

lhames via All-commits all-commits at lists.llvm.org
Thu Jan 19 22:39:38 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3507df9c20a4e117a27c005d7ceb5d1468378aa2
      https://github.com/llvm/llvm-project/commit/3507df9c20a4e117a27c005d7ceb5d1468378aa2
  Author: Lang Hames <lhames at gmail.com>
  Date:   2023-01-19 (Thu, 19 Jan 2023)

  Changed paths:
    M compiler-rt/lib/orc/macho_platform.cpp
    M llvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h
    M llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp

  Log Message:
  -----------
  [ORC][ORC-RT] Add support for callback-based lookup of JIT'd MachO unwind info.

In LLVM the MachOPlatform class is modified to identify unwind info sections
and the address ranges of the functions these sections cover. These address
ranges are then communicated to the ORC runtime by attaching them to the
register-object-platform-sections allocation action.

In the ORC runtime the unwind-info section addresses are recorded and used to
support lookup of unwind info via the new `findDynamicUnwindSections` function.
At bootstrap time the ORC runtime checks for the presence of new
unwind-info-lookup-registration functions in libunwind (see
https://reviews.llvm.org/D142176), and if available uses them to register the
`findDynamicUnwindSections` function with libunwind to enable callback-based
lookup. If the new unwind-info-lookup-registration functions are not available
then the ORC runtime falls back to using the existing libunwind registration
APIs.

The callback-based scheme is intended to address three shortcomings in the
current registration scheme for JIT'd unwind info on Darwin: (1) Lack of
compact-unwind support, (2) inability to describe the subarchitecture of JIT'd
frames, and (3) lack of efficient address-based lookup data structures in
libunwind.

For more details see the proposed libunwind changes in
https://reviews.llvm.org/D142176.




More information about the All-commits mailing list