Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve llvm-jitlink test infrastructure for allocation actions. #51845

Open
lhames opened this issue Nov 14, 2021 · 0 comments
Open

Improve llvm-jitlink test infrastructure for allocation actions. #51845

lhames opened this issue Nov 14, 2021 · 0 comments
Labels
bugzilla Issues migrated from bugzilla orcjit

Comments

@lhames
Copy link
Contributor

lhames commented Nov 14, 2021

Bugzilla Link 52503
Version trunk
OS All
CC @AlexDenisov,@benlangmuir,@dwblaikie,@lhames

Extended Description

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 " option to llvm-jitlink which adds aliases of the form executor_mangle() -> Dylib::lookup() 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.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla orcjit
Projects
None yet
Development

No branches or pull requests

1 participant