[PATCH] D101630: [HIP] Fix device-only compilation

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 4 10:05:25 PDT 2021


yaxunl added a comment.

In D101630#2799409 <https://reviews.llvm.org/D101630#2799409>, @tra wrote:

> In D101630#2798975 <https://reviews.llvm.org/D101630#2798975>, @yaxunl wrote:
>
>> For sure we will need -fgpu-bundle-device-output to control bundling of intermediate files. Then adding -emit-gpu-object and -emit-gpu-bundle may be redundant and can cause confusion. What if users specify `-c -fgpu-bundle-device-output -emit-gpu-object` or `-c -fno-gpu-bundle-device-output -emit-gpu-bundle`? To me a single option -fgpu-bundle-device-output to control all device output seems cleaner.
>
> The idea is to use `-emit-gpu-object` and `-emit-gpu-bundle` instead of the  `-f[no-]gpu-bundle-device-output`. Otherwise they'd do exactly the same thing.
>
> I think `-emit-gpu-{object,bundle}` has a minor edge over `-f[no-]gpu-bundle-device-output` as it's similar to other -emit options for controlling clang compilation phases (and that's what we want to do here), while `-f` options are usually for tweaking code generation.

But how do we control emitting LLVM IR with or without bundle? `-emit-llvm -emit-gpu-object` or `-emit-llvm -emit-gpu-bundle`? `-emit-*` is usually for specifying a specific file type.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101630/new/

https://reviews.llvm.org/D101630



More information about the cfe-commits mailing list