This is an archive of the discontinued LLVM Phabricator instance.

[mlir][ExecutionEngine] Only load JITDyLibs without init/destroy funcs.
ClosedPublic

Authored by ingomueller-net on Jun 19 2023, 12:20 AM.

Details

Summary

In https://reviews.llvm.org/D153029, I moved the loading/unloading
mechanisms of shared libraries from the JIT runner to the execution
engine in order to make that mechanism available in the latter
(including its Python bindings). However, I realized that I introduced a
small change in semantic: previously, the JIT runner checked for the
presence of init/destroy functions and only loaded the library as
JITDyLib if they were not present. After I moved the code, all libraries
were loaded as JITDyLib, even if they registered their symbols
explicitly in their init function. I am not sure if this is really a
problem but (1) the previous behavior was different and (2) I guess it
could cause a problem if some symbols are exported through the init
function *and* have public visibility. This patch reestablishes the
original behaviour in the new place of the code.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJun 19 2023, 12:20 AM
ingomueller-net requested review of this revision.Jun 19 2023, 12:20 AM
mehdi_amini accepted this revision.Jun 19 2023, 12:26 AM
This revision is now accepted and ready to land.Jun 19 2023, 12:26 AM