[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
Loading
Please sign in to comment