This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][JIT] Introduce environment variables to deal with JIT IR
ClosedPublic

Authored by jdoerfert on Jan 3 2023, 7:29 PM.

Details

Summary

We can now dump the IR before and after JIT optimizations into the
files passed via LIBOMPTARGET_JIT_PRE_OPT_IR_MODULE and
LIBOMPTARGET_JIT_POST_OPT_IR_MODULE, respectively.

Similarly, users can set LIBOMPTARGET_JIT_REPLACEMENT_MODULE to
replace the IR in the image with a custom IR module in a file.
All options take file paths, documentation was added.

Diff Detail

Event Timeline

jdoerfert created this revision.Jan 3 2023, 7:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 3 2023, 7:29 PM
jdoerfert requested review of this revision.Jan 3 2023, 7:29 PM
tianshilei1992 added inline comments.Jan 3 2023, 7:49 PM
openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp
298

We don’t check the error code?

jdoerfert added inline comments.Jan 3 2023, 8:02 PM
openmp/libomptarget/plugins-nextgen/common/PluginInterface/JIT.cpp
298

I'll add it.

tianshilei1992 accepted this revision.Jan 4 2023, 7:16 AM
This revision is now accepted and ready to land.Jan 4 2023, 7:16 AM
This revision was landed with ongoing or failed builds.Jan 5 2023, 12:18 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJan 5 2023, 12:18 AM