LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 52503 - Improve llvm-jitlink test infrastructure for allocation actions.
Summary: Improve llvm-jitlink test infrastructure for allocation actions.
Status: NEW
Alias: None
Product: libraries
Classification: Unclassified
Component: OrcJIT (show other bugs)
Version: trunk
Hardware: PC All
: P enhancement
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-14 12:04 PST by Lang Hames
Modified: 2021-11-14 12:04 PST (History)
5 users (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lang Hames 2021-11-14 12:04:30 PST
Allocation actions are run during JIT memory finalization and deallocation. The code for these actions may be in the ORC runtime. This makes them an awkward fit for llvm-jitlink -noexec tests, which (1) are meant to be able to run on all platforms, including platforms that can't execute the code being jit-linked at all (e.g. arm64 tests running on an x86-64 tester), and (2) ideally shouldn't assume that we have a built ORC runtime.

We could solve this by:
(1) Adding a jitlink-test-environment dylib to the build that provides mocks of the required actions.
(2) Add a new "add-executor-mangled-alias <name>" option to llvm-jitlink which adds aliases of the form executor_mangle(<name>) -> Dylib::lookup(<name>) to the session.

This will cause allocation actions to be redirected to code executable on the host and we can use this to print debugging output that can be used to verify that the required actions were run.