[all-commits] [llvm/llvm-project] f597ce: [ORC][Runtime] Enhancing ELF Platform with Push-Re...
SahilPatidar via All-commits
all-commits at lists.llvm.org
Sat Sep 28 00:33:41 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f597ce03a6b2b7268e6a5c11cf7478c87b65b2bc
https://github.com/llvm/llvm-project/commit/f597ce03a6b2b7268e6a5c11cf7478c87b65b2bc
Author: SahilPatidar <patidarsahil2001 at gmail.com>
Date: 2024-09-28 (Sat, 28 Sep 2024)
Changed paths:
M compiler-rt/lib/orc/elfnix_platform.cpp
M compiler-rt/lib/orc/elfnix_platform.h
M compiler-rt/lib/orc/macho_platform.cpp
A compiler-rt/lib/orc/sections_tracker.h
M llvm/include/llvm/ExecutionEngine/Orc/ELFNixPlatform.h
M llvm/lib/ExecutionEngine/Orc/ELFNixPlatform.cpp
Log Message:
-----------
[ORC][Runtime] Enhancing ELF Platform with Push-Request Model for Initializers (#102846)
With the help of @lhames, this PR introduces a push-request model to manage
initializers in the runtime state for each `JITDylib`, similar to how `MachO`
and `COFF` handle it. Previously, the ELF runtime lacked the ability to
register, deregister, or retain initializers, causing issues when re-running
`dlopen`. Initializers were erased after `rt_getInitializers` was used.
To address this, we introduce `__orc_rt_elfnix_register_init_sections` and
`__orc_rt_elfnix_register_jitdylib` (and corresponding deregister functions).
This model allows the runtime to request the push of initializers for the
`JITDylib`, with the platform handling this via a record method. Additionally,
we leverage `MachO`'s `RecordSectionsTracker` to store initializers, ensuring
only newly updated initializers are executed using `processNewSections`,
improving the runtime's efficiency and reliability.
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