Sometimes it is useful to compile HIP device code to LLVM BC. It is not convenient to use clang -cc1 since
there are lots of options needed.
This patch allows clang driver to compile HIP device code to LLVM BC with -emit-llvm -c.
Paths
| Differential D68284
[HIP] Support -emit-llvm for device compilation ClosedPublic Authored by yaxunl on Oct 1 2019, 11:16 AM.
Details Summary Sometimes it is useful to compile HIP device code to LLVM BC. It is not convenient to use clang -cc1 since This patch allows clang driver to compile HIP device code to LLVM BC with -emit-llvm -c.
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Oct 1 2019, 2:25 PM Comment Actions
Now it produces textural IR if used with -S. Comment Actions Could you also add a check for -S w/o -emit-llvm, too ? AFAICT it currently wants to produce a bundle, which is not very helpful. Closed by commit rL373561: [HIP] Support -emit-llvm for device compilation (authored by yaxunl). · Explain WhyOct 2 2019, 8:25 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 222959 cfe/trunk/lib/Driver/Driver.cpp
cfe/trunk/test/Driver/hip-device-compile.hip
|