This is an archive of the discontinued LLVM Phabricator instance.

[Driver][OpenMP] Update actions builder to create bundling action when necessary.
ClosedPublic

Authored by sfantao on Jun 29 2016, 11:40 AM.

Details

Summary

In order to save the user from dealing with multiple output files (for host and device) while using separate compilation, a new action OffloadBundlingAction is used when the last phase is not linking. This action will then result in a job that uses the proposed bundling tool to create a single preprocessed/IR/ASM/Object file from multiple ones.

The job creation for the new action will be proposed in a separate patch.

Diff Detail

Event Timeline

sfantao updated this revision to Diff 62258.Jun 29 2016, 11:40 AM
sfantao retitled this revision from to [Driver][OpenMP] Update actions builder to create bundling action when necessary..
sfantao updated this object.
sfantao added reviewers: echristo, tra, jlebar, hfinkel, ABataev.
sfantao updated this revision to Diff 62553.Jul 1 2016, 3:32 PM
  • Rebase.
  • Fix format.
sfantao updated this revision to Diff 62587.Jul 1 2016, 5:26 PM
  • Rebase
sfantao updated this revision to Diff 66026.Jul 28 2016, 2:52 PM
  • Rebase.
sfantao updated this revision to Diff 72123.Sep 21 2016, 3:47 PM
  • Rebase.
hfinkel accepted this revision.Sep 28 2016, 12:28 PM
hfinkel edited edge metadata.

LGTM

This revision is now accepted and ready to land.Sep 28 2016, 12:28 PM
sfantao closed this revision.Oct 27 2016, 11:00 AM
lijiansong added inline comments.
lib/Driver/Driver.cpp
2085–2096

hello,
if I want to compile device-only device code, e.g. clang foo.mlu a.cpp -o bar,
I want to get the following action graph:
for foo.mlu:
input -> preprocess->compile->backend->assemble ,
Then i will get foo.o,
for a.cpp:
input -> preprocess->compile->backend->assemble
then I will get a.o
i want to link foo.o with a.o to get bar, a.cpp is the main, while foo.mlu has the device computation logic.

How can I manage it with offload?

This comment was removed by lijiansong.