[PATCH] D141717: [Clang] Only emit textual LLVM-IR in device only mode

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 16 11:10:54 PST 2023


jhuber6 added a comment.

In D141717#4056971 <https://reviews.llvm.org/D141717#4056971>, @yaxunl wrote:

> The intention of -emit-llvm -S is usually to get LLVM assembly for all targets for inspection or modification. HIP emits a bundled LLVM assembly in textual format in this case. Users can modify it directly, or extract assembly for each device and bundle them together again. The modified file can then be passed on to the next compilation stage.

Yeah, this is part of where I'm questioning how we want to treat the compilation pipeline when we perform offloading. When I set up the new driver support I decided to eschew the idea of perfectly bundled phases and instead decided that if users did not want the full pipeline they should use `--offload-device-only` and built it for themselves. In that vein I'd prefer it to be where we always generate a full (To Assembler) phase and avoid textual formats since it's supposed to be embedded as a binary blob.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141717



More information about the cfe-commits mailing list