This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Use offload bundler when outputting textual formats with new driver
AbandonedPublic

Authored by jhuber6 on Mar 29 2022, 12:22 PM.

Details

Summary

The new OpenMP offloading currently driver embeds offloading IR directly
into the host object. This is easier to handle in the tooling, however
makes it difficult to easily inspect the output generated by the
compiler. The old method used the clang-offload-bundler tool put the IR
side-by-side. We should do something similar with the new driver to
prevent the need to use save-temps for simple cases. An example of this
is shown when using a tool like godbolt to share code:
https://godbolt.org/z/eYEcYsbs5.

This doesn't address bundling preprocessor output yet.

Diff Detail

Event Timeline

jhuber6 created this revision.Mar 29 2022, 12:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2022, 12:22 PM
jhuber6 requested review of this revision.Mar 29 2022, 12:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2022, 12:22 PM
MaskRay added inline comments.Mar 29 2022, 1:17 PM
clang/test/Driver/openmp-offload-gpu.c
350

Delete excessive indentation

Generally indenting the continuation lines by 2 column is sufficient.

jhuber6 added inline comments.Mar 29 2022, 1:20 PM
clang/test/Driver/openmp-offload-gpu.c
350

All the other lines are formatted like this in this file so I was just keeping it consistent. I could make a separate patch to clean it up.

jhuber6 abandoned this revision.Jun 27 2022, 4:40 PM