[all-commits] [llvm/llvm-project] d50dac: [Clang] Only emit textual LLVM-IR in device only mode
Joseph Huber via All-commits
all-commits at lists.llvm.org
Tue Jan 24 13:11:59 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d50dacd7c3c2ce489df6ed1ccde71bba390fe5e2
https://github.com/llvm/llvm-project/commit/d50dacd7c3c2ce489df6ed1ccde71bba390fe5e2
Author: Joseph Huber <jhuber6 at vols.utk.edu>
Date: 2023-01-24 (Tue, 24 Jan 2023)
Changed paths:
M clang/lib/Driver/Driver.cpp
M clang/test/Driver/openmp-offload-gpu.c
Log Message:
-----------
[Clang] Only emit textual LLVM-IR in device only mode
Currently, we embed device code into the host to perform
multi-architecture linking and handling of device code. If the user
specified `-S -emit-llvm` then the embedded output will be textual
LLVM-IR. This is a problem because it can't be used by the LTO backend
and it makes reading the file confusing.
This patch changes the behaviour to only emit textual device IR if we
are in device only mode, that is, if the device code is presented
directly to the user instead of being embedded. Otherwise we should
always embed device bitcode instead.
Reviewed By: tra
Differential Revision: https://reviews.llvm.org/D141717
More information about the All-commits
mailing list